1 #ifndef _QG_FILE_HANDLER_HH_
2 #define _QG_FILE_HANDLER_HH_
23 #include <TEventList.h>
49 void GetEvent(
const Long64_t eventNumber,
const std::string& samplesName =
"");
61 const Diana::QVector&
GetPulse(
const Long64_t eventNumber,
const std::string& samplesName);
63 TObject*
GetGenericObject(
const Long64_t eventNumber,
const std::string& samplesName);
108 void OpenFiles(
const std::vector<std::string>& files);
basic channel and run based info. Used in the QRunData object.
Class to handle ROOT files.
time_t ModificationTime(const std::string &filename)
Return modification time of file.
Diana::QGlobalDataManager * fDataManager
std::set< std::string > GetSetOfQVectorAliases()
Get the aliases defined in the tree.
double fLowestStartTimeUnix
Lowest StartTimeUnix of open files.
std::set< std::string > GetSetOfLeaves()
Get the names of the leaves of the tree.
bool fFileOpen
File open flag.
Diana::QVector fSamples
samples (QVector or QVectorI or QPulse) to load
void OpenFile(std::string filename)
Open a new file, add it to the chain.
std::set< std::string > GetSetOfAliases()
Get the aliases defined in the tree.
const QRunData * GetRunData(const Long64_t eventNumber)
Get the run data for an event.
std::string fDataDirectory
Directory containing data files.
const QChannelRunData * GetChannelRunData(const Long64_t eventNumber)
Get the run data for an event.
const Diana::QVector & GetPulse(const Long64_t eventNumber, const std::string &samplesName)
Get the pulse of an event.
bool CheckForModifiedFiles()
Check whether any open file has been modified.
TEventList GetEventList(TCut cuts)
Get an event list containing the events passing a cut.
std::set< std::string > fNumericTypes
Collection of numeric data types.
void SetUpChain()
Set up the chain.
std::vector< std::string > fFilenames
Filenames.
QHeader * fHeader
QBaseEvent.
std::string fTreeClass
Name of tree's class.
bool IsFileOpen()
Check whether a file is open.
void OpenFile()
Pop up a file open dialog.
TObject * GetGenericObject(const Long64_t eventNumber, const std::string &samplesName)
void ParseFileList(const std::string &filename)
Parse file list.
std::string GetDefaultPulseLabel() const
Get the names of the leaves of the tree.
void ReopenFiles()
Reopen files.
void SetUpNumericTypes()
Specify the numeric data types.
Diana::QVector fDefaultPulse
Default (empty) pulse, for use when opening a non-Diana file.
std::set< std::string > GetSetOfQVectorLeaves()
Get the names of the leaves of the tree.
std::vector< std::string > GetFilenames()
Get a vector containing the names of the open files.
const std::vector< QSampleInfo > & GetSignificantSamples(const Long64_t eventNumber)
Get significant samples of an event.
std::string fDefaultPulseLabel
defalt label of samples to load
const QSampleInfo & GetMasterSample(const Long64_t eventNumber)
Get master sample of an event.
void SetLowestStartTimeUnix(const std::string &treeName)
Set LowestStartTimeUnix alias.
void GetEvent(const Long64_t eventNumber, const std::string &samplesName="")
Get an event.
void ListOpenFiles()
Print a list of open files to the console.
virtual ~QGFileHandler()
Destructor.
std::map< std::string, time_t > fModificationTime
Modification times of every open file.
QGFileHandler()
Constructor.
QChain * GetQChain()
Get a pointer to the chian.
void CloseFiles()
Close all open files, empty the chain.
TEventList fEventList
Event list.
void OpenFiles(const std::vector< std::string > &files)
Open files, add them to the chain.
std::string GetTreeClass()
Get the class name of the tree.
Object to manage I/O (DB, file, or memory) of diana global quantities.
Raw event: bolometer channel, trigger positions and types.
contains information on flagged samples
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...