#include <GaudiAlg/GaudiTuples.h>
Inheritance diagram for GaudiTuples< PBASE >:
Public Types | |
typedef GaudiAlg::HistoID | HistoID |
the actual type for histogram identifier | |
typedef Tuples::Tuple | Tuple |
the actual type of the tuple | |
typedef GaudiAlg::TupleID | TupleID |
the actual type of N-tuple ID | |
typedef GaudiAlg::TupleMapTitle | TupleMapTitle |
the actual type of (title) -> (tuple) mappping | |
typedef GaudiAlg::TupleMapNumericID | TupleMapNumID |
the actual type of (Numeric ID) -> (tuple) mappping | |
typedef GaudiAlg::TupleMapLiteralID | TupleMapLitID |
the actual type of (Literal ID) -> (tuple) mappping | |
Public Member Functions | |
Tuple | nTuple (const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
Access an N-Tuple object (book on-demand) with unique identifier. | |
Tuple | nTuple (const TupleID &ID, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
Access an N-Tuple object (book on-demand) with forced identifier. | |
Tuple | evtCol (const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
Access an Event Tag Collection object (book on-demand) with unique identifier. | |
Tuple | evtCol (const TupleID &ID, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
Access an Event Tag Collection object (book on-demand) with forced identifier. | |
bool | produceNTuples () const |
get the flag for N-Tuple production (property "NTupleProduce") | |
bool | splitNTupleDir () const |
get the flag for N-Tuple path split (property "NTupleSplitDir") | |
const std::string & | nTupleLUN () const |
get the logical unit for N-Tuples (property "NTupleLUN") | |
const std::string & | nTupleTopDir () const |
get the top-level N-Tuple directory (property "NTupleTopDir") | |
const std::string & | nTupleDir () const |
get the N-Tuple directory (property "NTupleDir") | |
TupleID::NumericID | nTupleOffSet () const |
get the value for N-Tuple offset (property "NTupleOffSet") | |
std::string | nTuplePath () const |
get the constructed N-Tuple path | |
bool | produceEvtCols () const |
get the flag for Event Tag Collection production (property "EvtColsProduce") | |
bool | splitEvtColDir () const |
get the flag for Event Tag Collection path split (property "EvtColsSplitDir") | |
const std::string & | evtColLUN () const |
get the logical unit for Event Tag Collections (property "EvtColsLUN") | |
const std::string & | evtColTopDir () const |
get the top-level Event Tag Collection directory (property "EvtColsTopDir") | |
const std::string & | evtColDir () const |
get the Event Tag Collection directory (property "EvtColsDir") | |
TupleID::NumericID | evtColOffSet () const |
get the value for Event Tag Collection offset (property "EvtColsOffSet") | |
std::string | evtColPath () const |
get the constructed Event Tag Collection path | |
bool | tuplesPrint () const |
print tuples at finalization | |
bool | evtColsPrint () const |
print event collections at finalization | |
long | printTuples () const |
perform the actual printout of N-tuples | |
long | printEvtCols () const |
perform the actual printout of Evt Tag Collections | |
bool | nTupleExists (const TupleID &ID) const |
check the existence AND validity of the N-Tuple with the given ID | |
bool | evtColExists (const TupleID &ID) const |
check the existence AND validity of the Event Tag Collection with the given ID | |
GaudiTuples (const std::string &name, ISvcLocator *pSvcLocator) | |
Algorithm constructor. | |
GaudiTuples (const std::string &type, const std::string &name, const IInterface *parent) | |
Tool constructor. | |
virtual | ~GaudiTuples () |
Destructor. | |
Protected Member Functions | |
const TupleMapTitle & | nTupleMapTitle () const |
access to the all ntuples by title | |
const TupleMapTitle & | evtColMapTitle () const |
access to the all evet tag collections by title | |
const TupleMapNumID & | nTupleMapNumID () const |
access to the all ntuples by numeric ID | |
const TupleMapNumID & | evtColMapNumID () const |
access to the all evet tag collections by numeric ID | |
const TupleMapLitID & | nTupleMapLitID () const |
access to the all ntuples by literal ID | |
const TupleMapLitID & | evtColMapLitID () const |
access to the all evet tag collections by literal ID | |
virtual Tuples::TupleObj * | createNTuple (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const |
create TupleObj | |
virtual Tuples::TupleObj * | createEvtCol (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const |
create TupleObj for event tag collection | |
virtual StatusCode | initialize () |
standard initialization method | |
virtual StatusCode | finalize () |
standard finalization method | |
Private Member Functions | |
void | initGaudiTuplesConstructor () |
Constructor initialisation and job options. | |
Private Attributes | |
bool | m_produceNTuples |
flag to switch ON/OFF the ntuple filling and booking | |
bool | m_splitNTupleDir |
flag to indicate splitting of tuple directories (useful for HBOOK) | |
std::string | m_nTupleLUN |
name of logical unit for tuple directory | |
std::string | m_nTupleTopDir |
top level tuple directory | |
std::string | m_nTupleDir |
local tuple directory | |
TupleID::NumericID | m_nTupleOffSet |
the offset for ntuple numerical ID | |
bool | m_produceEvtCols |
flag to switch ON/OFF the ntuple filling and booking | |
bool | m_splitEvtColDir |
flag to indicate splitting of tuple directories (useful for HBOOK) | |
std::string | m_evtColLUN |
name of Logical Unit for tuple directory | |
std::string | m_evtColTopDir |
top level tuple directory | |
std::string | m_evtColDir |
local tuple directory | |
TupleID::NumericID | m_evtColOffSet |
the offset for ntuple numerical ID | |
bool | m_tuplesPrint |
print tuples at finalization? print tuples at finalization? | |
bool | m_evtColsPrint |
print event collections at finalization print event collections at finalization | |
TupleMapTitle | m_nTupleMapTitle |
the actual storage of ntuples by title | |
TupleMapNumID | m_nTupleMapNumID |
the actual storage of ntuples by numeric ID | |
TupleMapLitID | m_nTupleMapLitID |
the actual storage of ntuples by literal ID | |
TupleMapTitle | m_evtColMapTitle |
the actual storage of event collections by title | |
TupleMapNumID | m_evtColMapNumID |
the actual storage of event collections by numeric ID | |
TupleMapLitID | m_evtColMapLitID |
the actual storage of event collections by literal ID |
Vanya BELYAEV Ivan.Belyaev@itep.ru
Definition at line 40 of file GaudiTuples.h.
typedef GaudiAlg::HistoID GaudiTuples< PBASE >::HistoID |
typedef Tuples::Tuple GaudiTuples< PBASE >::Tuple |
the actual type of the tuple
Reimplemented in TupleTool.
Definition at line 49 of file GaudiTuples.h.
typedef GaudiAlg::TupleID GaudiTuples< PBASE >::TupleID |
the actual type of N-tuple ID
Reimplemented in TupleTool.
Definition at line 51 of file GaudiTuples.h.
typedef GaudiAlg::TupleMapTitle GaudiTuples< PBASE >::TupleMapTitle |
typedef GaudiAlg::TupleMapNumericID GaudiTuples< PBASE >::TupleMapNumID |
typedef GaudiAlg::TupleMapLiteralID GaudiTuples< PBASE >::TupleMapLitID |
GaudiTuples< PBASE >::GaudiTuples | ( | const std::string & | name, | |
ISvcLocator * | pSvcLocator | |||
) |
Algorithm constructor.
GaudiTuples< PBASE >::GaudiTuples | ( | const std::string & | type, | |
const std::string & | name, | |||
const IInterface * | parent | |||
) |
Tool constructor.
virtual GaudiTuples< PBASE >::~GaudiTuples | ( | ) | [virtual] |
Destructor.
Tuple GaudiTuples< PBASE >::nTuple | ( | const std::string & | title, | |
const CLID & | clid = CLID_ColumnWiseTuple | |||
) | const |
Access an N-Tuple object (book on-demand) with unique identifier.
Tuple tuple = nTuple( "My N-Tuple" ) ; tuple->column( "A" , sin(0.1) ); tuple->column( "B" , cos(0.1) ); tuple->column( "C" , tan(0.1) ); tuple->write();
title | Unique title for N-Tuple | |
clid | N-Tuple class identifier (row or column wise) |
Reimplemented in TupleTool.
Tuple GaudiTuples< PBASE >::nTuple | ( | const TupleID & | ID, | |
const std::string & | title, | |||
const CLID & | clid = CLID_ColumnWiseTuple | |||
) | const |
Access an N-Tuple object (book on-demand) with forced identifier.
// Book Ntuple with a numeric ID Tuple tuple = nTuple( 1, "My tuple" ) ; // ... or Tuple tuple = nTuple( "1", "My tuple" ) ; // ... or, Book Ntuple with a literal ID Tuple tuple = nTuple( "mytuple", "My tuple" ) ; // ... or, Book Ntuple with a literal ID in a sub-dir Tuple tuple = nTuple( "subdir/mytuple", "My tuple" ) ; // Fill and write NTuple tuple->column( "A" , sin(0.1) ); tuple->column( "B" , cos(0.1) ); tuple->column( "C" , tan(0.1) ); tuple->write();
ID | The forced N-Tuple ID | |
title | Unique title for N-Tuple | |
clid | N-Tuple class identifier (row or column wise) |
Reimplemented in TupleTool.
Tuple GaudiTuples< PBASE >::evtCol | ( | const std::string & | title, | |
const CLID & | clid = CLID_ColumnWiseTuple | |||
) | const |
Access an Event Tag Collection object (book on-demand) with unique identifier.
Tuple tuple = evtCol( "My Tag Collection" ) ; tuple->column( "A" , sin(0.1) ); tuple->column( "B" , cos(0.1) ); tuple->column( "C" , tan(0.1) ); tuple->write();
The Event Tag Collection will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first Event Tag Collection booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given Event Tag Collection will be given when filled under conditional statements, since in these circumstances the order in which the Event Tag Collection are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given Event Tag Collection could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
title | Unique title for Event Tag Collection | |
clid | N-Tuple class identifier (row or column wise) |
Reimplemented in TupleTool.
Tuple GaudiTuples< PBASE >::evtCol | ( | const TupleID & | ID, | |
const std::string & | title, | |||
const CLID & | clid = CLID_ColumnWiseTuple | |||
) | const |
Access an Event Tag Collection object (book on-demand) with forced identifier.
// Book Ntuple with a numeric ID Tuple tuple = evtCol( 1, "My Tag Collection" ) ; // ... or Tuple tuple = evtCol( "1", "My Tag Collection" ) ; // ... or, Book Ntuple with a literal ID Tuple tuple = evtCol( "mytuple", "My Tag Collection" ) ; // ... or, Book Ntuple with a literal ID in a sub-dir Tuple tuple = evtCol( "subdir/mytuple", "My Tag Collection" ) ; // Fill and write tuple->column( "A" , sin(0.1) ); tuple->column( "B" , cos(0.1) ); tuple->column( "C" , tan(0.1) ); tuple->write();
ID | The forced Event Tag Collection ID | |
title | Unique title for Event Tag Collection | |
clid | N-Tuple class identifier (row or column wise) |
Reimplemented in TupleTool.
bool GaudiTuples< PBASE >::produceNTuples | ( | ) | const [inline] |
get the flag for N-Tuple production (property "NTupleProduce")
Definition at line 216 of file GaudiTuples.h.
00216 { return m_produceNTuples ; }
bool GaudiTuples< PBASE >::splitNTupleDir | ( | ) | const [inline] |
get the flag for N-Tuple path split (property "NTupleSplitDir")
Definition at line 218 of file GaudiTuples.h.
00218 { return m_splitNTupleDir ; }
const std::string& GaudiTuples< PBASE >::nTupleLUN | ( | ) | const [inline] |
get the logical unit for N-Tuples (property "NTupleLUN")
Definition at line 220 of file GaudiTuples.h.
00220 { return m_nTupleLUN ; }
const std::string& GaudiTuples< PBASE >::nTupleTopDir | ( | ) | const [inline] |
get the top-level N-Tuple directory (property "NTupleTopDir")
Definition at line 222 of file GaudiTuples.h.
00222 { return m_nTupleTopDir ; }
const std::string& GaudiTuples< PBASE >::nTupleDir | ( | ) | const [inline] |
get the N-Tuple directory (property "NTupleDir")
Definition at line 224 of file GaudiTuples.h.
00224 { return m_nTupleDir ; }
TupleID::NumericID GaudiTuples< PBASE >::nTupleOffSet | ( | ) | const [inline] |
get the value for N-Tuple offset (property "NTupleOffSet")
Definition at line 226 of file GaudiTuples.h.
00226 { return m_nTupleOffSet ; }
std::string GaudiTuples< PBASE >::nTuplePath | ( | ) | const [inline] |
get the constructed N-Tuple path
Definition at line 228 of file GaudiTuples.h.
00229 { 00230 const std::string path = nTupleLUN() + "/" + nTupleTopDir() + nTupleDir(); 00231 return ( splitNTupleDir() ? dirHbookName( path ) : path ) ; 00232 }
bool GaudiTuples< PBASE >::produceEvtCols | ( | ) | const [inline] |
get the flag for Event Tag Collection production (property "EvtColsProduce")
Definition at line 235 of file GaudiTuples.h.
00235 { return m_produceEvtCols ; }
bool GaudiTuples< PBASE >::splitEvtColDir | ( | ) | const [inline] |
get the flag for Event Tag Collection path split (property "EvtColsSplitDir")
Definition at line 237 of file GaudiTuples.h.
00237 { return m_splitEvtColDir ; }
const std::string& GaudiTuples< PBASE >::evtColLUN | ( | ) | const [inline] |
get the logical unit for Event Tag Collections (property "EvtColsLUN")
Definition at line 239 of file GaudiTuples.h.
00239 { return m_evtColLUN ; }
const std::string& GaudiTuples< PBASE >::evtColTopDir | ( | ) | const [inline] |
get the top-level Event Tag Collection directory (property "EvtColsTopDir")
Definition at line 241 of file GaudiTuples.h.
00241 { return m_evtColTopDir ; }
const std::string& GaudiTuples< PBASE >::evtColDir | ( | ) | const [inline] |
get the Event Tag Collection directory (property "EvtColsDir")
Definition at line 243 of file GaudiTuples.h.
00243 { return m_evtColDir ; }
TupleID::NumericID GaudiTuples< PBASE >::evtColOffSet | ( | ) | const [inline] |
get the value for Event Tag Collection offset (property "EvtColsOffSet")
Definition at line 245 of file GaudiTuples.h.
00245 { return m_evtColOffSet ; }
std::string GaudiTuples< PBASE >::evtColPath | ( | ) | const [inline] |
get the constructed Event Tag Collection path
Definition at line 247 of file GaudiTuples.h.
00248 { 00249 std::string path = evtColLUN() + "/" + evtColTopDir() + evtColDir(); 00250 return ( splitEvtColDir() ? dirHbookName( path ) : path ); 00251 }
bool GaudiTuples< PBASE >::tuplesPrint | ( | ) | const [inline] |
print tuples at finalization
Definition at line 254 of file GaudiTuples.h.
00254 { return m_tuplesPrint ; }
bool GaudiTuples< PBASE >::evtColsPrint | ( | ) | const [inline] |
print event collections at finalization
Definition at line 256 of file GaudiTuples.h.
00256 { return m_evtColsPrint ; }
long GaudiTuples< PBASE >::printTuples | ( | ) | const |
perform the actual printout of N-tuples
long GaudiTuples< PBASE >::printEvtCols | ( | ) | const |
perform the actual printout of Evt Tag Collections
bool GaudiTuples< PBASE >::nTupleExists | ( | const TupleID & | ID | ) | const |
check the existence AND validity of the N-Tuple with the given ID
bool GaudiTuples< PBASE >::evtColExists | ( | const TupleID & | ID | ) | const |
check the existence AND validity of the Event Tag Collection with the given ID
const TupleMapTitle& GaudiTuples< PBASE >::nTupleMapTitle | ( | ) | const [inline, protected] |
access to the all ntuples by title
Definition at line 281 of file GaudiTuples.h.
00281 { return m_nTupleMapTitle ; }
const TupleMapTitle& GaudiTuples< PBASE >::evtColMapTitle | ( | ) | const [inline, protected] |
access to the all evet tag collections by title
Definition at line 283 of file GaudiTuples.h.
00283 { return m_evtColMapTitle ; }
const TupleMapNumID& GaudiTuples< PBASE >::nTupleMapNumID | ( | ) | const [inline, protected] |
access to the all ntuples by numeric ID
Definition at line 285 of file GaudiTuples.h.
00285 { return m_nTupleMapNumID ; }
const TupleMapNumID& GaudiTuples< PBASE >::evtColMapNumID | ( | ) | const [inline, protected] |
access to the all evet tag collections by numeric ID
Definition at line 287 of file GaudiTuples.h.
00287 { return m_evtColMapNumID ; }
const TupleMapLitID& GaudiTuples< PBASE >::nTupleMapLitID | ( | ) | const [inline, protected] |
access to the all ntuples by literal ID
Definition at line 289 of file GaudiTuples.h.
00289 { return m_nTupleMapLitID ; }
const TupleMapLitID& GaudiTuples< PBASE >::evtColMapLitID | ( | ) | const [inline, protected] |
access to the all evet tag collections by literal ID
Definition at line 291 of file GaudiTuples.h.
00291 { return m_evtColMapLitID ; }
virtual Tuples::TupleObj* GaudiTuples< PBASE >::createNTuple | ( | const std::string & | name, | |
NTuple::Tuple * | tuple, | |||
const CLID & | clid | |||
) | const [protected, virtual] |
create TupleObj
name | name/title | |
tuple | the underlying ntuple implementation | |
clid | unique classID for ntuple |
virtual Tuples::TupleObj* GaudiTuples< PBASE >::createEvtCol | ( | const std::string & | name, | |
NTuple::Tuple * | tuple, | |||
const CLID & | clid | |||
) | const [protected, virtual] |
create TupleObj for event tag collection
name | name/title | |
tuple | the underlying ntuple implementation | |
clid | unique classID for ntuple |
virtual StatusCode GaudiTuples< PBASE >::initialize | ( | ) | [protected, virtual] |
standard initialization method
Reimplemented in GaudiTupleAlg, and GaudiTupleTool.
virtual StatusCode GaudiTuples< PBASE >::finalize | ( | ) | [protected, virtual] |
standard finalization method
Reimplemented in GaudiTupleAlg, and GaudiTupleTool.
void GaudiTuples< PBASE >::initGaudiTuplesConstructor | ( | ) | [inline, private] |
Constructor initialisation and job options.
Definition at line 348 of file GaudiTuples.h.
00349 { 00350 m_produceNTuples = true ; // Switch ON/OFF ntuple production 00351 m_splitNTupleDir = false ; // for HBOOK it is better to use 'true' 00352 m_nTupleLUN = "FILE1" ; // logical unit for ntuples 00353 m_nTupleTopDir = "" ; // top level ntuple directory 00354 m_nTupleDir = this->name() ; // ntuple directory 00355 m_nTupleOffSet = 0 ; // offset for ntuples 00356 // 00357 m_produceEvtCols = false ; // Switch ON/OFF ntupel production 00358 m_splitEvtColDir = false ; // for HBOOK it is better to use 'true' 00359 m_evtColLUN = "EVTCOL" ; // logical unit for ntuples 00360 m_evtColTopDir = "" ; // top level ntuple directory 00361 m_evtColDir = this->name() ; // ntuple directory 00362 m_evtColOffSet = 0 ; // offset for ntuples 00363 // 00364 m_tuplesPrint = true ; // print tuples at end of job 00365 m_evtColsPrint = false ; // print event collections at end of job 00366 // 00367 this->declareProperty ( "NTupleProduce" , m_produceNTuples ) ; 00368 this->declareProperty ( "NTuplePrint" , m_tuplesPrint ) ; 00369 this->declareProperty ( "NTupleSplitDir" , m_splitNTupleDir ) ; 00370 this->declareProperty ( "NTupleOffSet" , m_nTupleOffSet ) ; 00371 this->declareProperty ( "NTupleLUN" , m_nTupleLUN ) ; 00372 this->declareProperty ( "NTupleTopDir" , m_nTupleTopDir ) ; 00373 this->declareProperty ( "NTupleDir" , m_nTupleDir ) ; 00374 // 00375 this->declareProperty ( "EvtColsProduce" , m_produceEvtCols ) ; 00376 this->declareProperty ( "EvtColsPrint" , m_evtColsPrint ) ; 00377 this->declareProperty ( "EvtColSplitDir" , m_splitEvtColDir ) ; 00378 this->declareProperty ( "EvtColOffSet" , m_evtColOffSet ) ; 00379 this->declareProperty ( "EvtColLUN" , m_evtColLUN ) ; 00380 this->declareProperty ( "EvtColTopDir" , m_evtColTopDir ) ; 00381 this->declareProperty ( "EvtColDir" , m_evtColDir ) ; 00382 }
bool GaudiTuples< PBASE >::m_produceNTuples [private] |
bool GaudiTuples< PBASE >::m_splitNTupleDir [private] |
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition at line 389 of file GaudiTuples.h.
std::string GaudiTuples< PBASE >::m_nTupleLUN [private] |
std::string GaudiTuples< PBASE >::m_nTupleTopDir [private] |
std::string GaudiTuples< PBASE >::m_nTupleDir [private] |
TupleID::NumericID GaudiTuples< PBASE >::m_nTupleOffSet [private] |
bool GaudiTuples< PBASE >::m_produceEvtCols [private] |
bool GaudiTuples< PBASE >::m_splitEvtColDir [private] |
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition at line 402 of file GaudiTuples.h.
std::string GaudiTuples< PBASE >::m_evtColLUN [private] |
std::string GaudiTuples< PBASE >::m_evtColTopDir [private] |
std::string GaudiTuples< PBASE >::m_evtColDir [private] |
TupleID::NumericID GaudiTuples< PBASE >::m_evtColOffSet [private] |
bool GaudiTuples< PBASE >::m_tuplesPrint [private] |
print tuples at finalization? print tuples at finalization?
Definition at line 413 of file GaudiTuples.h.
bool GaudiTuples< PBASE >::m_evtColsPrint [private] |
print event collections at finalization print event collections at finalization
Definition at line 415 of file GaudiTuples.h.
TupleMapTitle GaudiTuples< PBASE >::m_nTupleMapTitle [mutable, private] |
TupleMapNumID GaudiTuples< PBASE >::m_nTupleMapNumID [mutable, private] |
TupleMapLitID GaudiTuples< PBASE >::m_nTupleMapLitID [mutable, private] |
TupleMapTitle GaudiTuples< PBASE >::m_evtColMapTitle [mutable, private] |
TupleMapNumID GaudiTuples< PBASE >::m_evtColMapNumID [mutable, private] |
TupleMapLitID GaudiTuples< PBASE >::m_evtColMapLitID [mutable, private] |