CFEL - ASG Software Suite  2.5.0
CASS
Functions
cass::ROOT Namespace Reference

namespace for ROOT related functions More...

Functions

string eventIdToDirectoryName (uint64_t eventid)
 function to create a human readable directory name from the eventid More...
 
void changeDir (TFile *file, const string &dirname)
 create a directory if it does not exist and cd into it More...
 
void copyHistToRootFile (const Processor::result_t &casshist, const string &valname)
 function that will copy a histogram to file More...
 

Detailed Description

namespace for ROOT related functions

Function Documentation

void cass::ROOT::changeDir ( TFile *  file,
const string &  dirname 
)

create a directory if it does not exist and cd into it

Parameters
filethe file in which the directory should be created
dirnamethe directory name that is realtiv to the current directory
Author
Lutz Foucar

find out wether directory exists

if not, create it

if there is no '/' then this is the last sub dir

otherwise split the string to lefthandside and righthandside of "/"

check wether subdir exits

if so, cd into it

otherwise create it and then cd into it

when there is no "/" anymore break

the new temp is all that is on the right hand side

make the requested dir the current global dir

Definition at line 71 of file root_converter.cpp.

Referenced by cass::pp2000::aboutToQuit(), and cass::pp2000::processEvent().

void cass::ROOT::copyHistToRootFile ( const Processor::result_t casshist,
const string &  valname 
)

function that will copy a histogram to file

Parameters
casshistthe cass histogram that should be written to file
valnamethe name of the histogram in the root file
Author
Lutz Foucar

create root histogram from cass histogram properties

set up axis

copy histogram contents

copy over / underflow

copy number of fills (how many shots have been accumulated)

create root histogram from cass histogram properties

make sure that the histogram is drawn in color and with color bar

set up axis

copy histogram contents

copy over / underflow

copy number of fills (how many shots have been accumulated)

write the histogram to root file

Definition at line 127 of file root_converter.cpp.

References cass::Result< T >::axis(), cass::Result< T >::dim(), cass::Result< T >::getValue(), cass::Result< float >::Left, cass::Result< float >::LowerLeft, cass::Result< float >::LowerMiddle, cass::Result< float >::LowerRight, cass::Result< float >::Overflow, cass::Result< float >::Right, cass::Result< float >::Underflow, cass::Result< float >::UpperLeft, cass::Result< float >::UpperMiddle, cass::Result< float >::UpperRight, cass::Result< float >::xAxis, and cass::Result< float >::yAxis.

Referenced by cass::pp2000::aboutToQuit(), and cass::pp2000::processEvent().

string cass::ROOT::eventIdToDirectoryName ( uint64_t  eventid)

function to create a human readable directory name from the eventid

Parameters
eventidthe event id to create the human readable name from
Author
Lutz Foucar

Definition at line 45 of file root_converter.cpp.

References cass::Log::add(), cass::Log::DEBUG4, eventid, QDateTime::setTime_t(), cass::ACQIRIS::time, and QDateTime::toString().

Referenced by cass::pp2000::processEvent().