#include <DybShuffle.h>
Inheritance diagram for DybShuffle:
Public Member Functions | |
DybShuffle (const std::string &name, ISvcLocator *pSvcLocator) | |
StatusCode | initialize () |
StatusCode | execute () |
StatusCode | finalize () |
DayaBay::RandomHeader * | GetCurrentHeaderObject () const |
Access last HeaderType HeaderObject made. | |
virtual StatusCode | sysInitialize () |
Will call initialize(). | |
virtual StatusCode | sysExecute () |
Will call preExecute() execute() and postExecute(). | |
virtual StatusCode | preExecute () |
be called before execute(). | |
virtual StatusCode | postExecute () |
be called after execute(). | |
virtual StatusCode | sysFinalize () |
Will call finalize(). | |
IDataProviderSvc * | arcSvc () const |
Access the archive Event Service. | |
void | putTES (DataObject *obj, std::string location) const |
Put data in the TES. | |
template<class TYPE> | |
TYPE * | getTES (std::string location) const |
Access data from the TES. | |
template<class TYPE> | |
TYPE * | getAES (std::string location, int index) const |
Access data from the Archive Event service at the given index. | |
std::vector< DataObject * > | getAEScollection (std::string location) const |
Return the list of archived data objects at the given location. | |
int | getExecNum () |
Access current execution ("event") number. | |
std::string | Location () const |
Access the TES location. | |
void | put (IDataProviderSvc *svc, DataObject *object, const std::string &address, const bool useRootInTES=true) const |
void | put (DataObject *object, const std::string &address, const bool useRootInTES=true) const |
Gaudi::Utils::GetData< TYPE >::return_type | get (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
Gaudi::Utils::GetData< TYPE >::return_type | get (const std::string &location, const bool useRootInTES=true) const |
TYPE * | getDet (IDataProviderSvc *svc, const std::string &location) const |
TYPE * | getDet (const std::string &location) const |
bool | exist (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
bool | exist (const std::string &location, const bool useRootInTES=true) const |
bool | existDet (IDataProviderSvc *svc, const std::string &location) const |
bool | existDet (const std::string &location) const |
TYPE * | getOrCreate (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
TYPE * | getOrCreate (const std::string &location, const bool useRootInTES=true) const |
bool | registerContext () const |
INTupleSvc * | evtColSvc () const |
IAlgContextSvc * | contextSvc () const |
TOOL * | tool (const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const |
TOOL * | tool (const std::string &type, const IInterface *parent=0, bool create=true) const |
SERVICE * | svc (const std::string &name, const bool create=true) const |
IUpdateManagerSvc * | updMgrSvc () const |
IDataProviderSvc * | fastContainersSvc () const |
StatusCode | Error (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const |
StatusCode | Warning (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const |
StatusCode | Print (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const |
StatusCode | Assert (const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Assert (const bool ok, const char *message, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg, const std::exception &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg="no message", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
MsgStream & | msgStream (const MSG::Level level) const |
MsgStream & | always () const |
MsgStream & | fatal () const |
MsgStream & | err () const |
MsgStream & | error () const |
MsgStream & | warning () const |
MsgStream & | info () const |
MsgStream & | debug () const |
MsgStream & | verbose () const |
MsgStream & | msg () const |
const Statistics & | counters () const |
StatEntity & | counter (const std::string &tag) const |
MSG::Level | msgLevel () const |
bool | msgLevel (const MSG::Level level) const |
void | resetMsgStream () const |
bool | typePrint () const |
bool | propsPrint () const |
bool | statPrint () const |
bool | errorsPrint () const |
long | printStat (const MSG::Level level=MSG::ALWAYS) const |
long | printErrors (const MSG::Level level=MSG::ALWAYS) const |
long | printProps (const MSG::Level level=MSG::ALWAYS) const |
void | registerCondition (const std::string &condition, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (const std::string &condition, CondType *&condPtrDest, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (char *condition, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL) |
StatusCode | runUpdate () |
TransientFastContainer< T > * | getFastContainer (const std::string &location, typename TransientFastContainer< T >::size_type initial=0) |
StatusCode | release (const IInterface *interface) const |
unsigned long | release () |
const std::string & | context () const |
const std::string & | rootInTES () const |
double | globalTimeOffset () const |
virtual StatusCode | sysStart () |
virtual StatusCode | sysReinitialize () |
virtual StatusCode | sysRestart () |
virtual StatusCode | sysStop () |
virtual StatusCode | sysBeginRun () |
virtual StatusCode | sysEndRun () |
virtual const std::string & | name () const |
virtual const std::string & | version () const |
virtual StatusCode | configure () |
virtual StatusCode | terminate () |
virtual StatusCode | start () |
virtual StatusCode | stop () |
virtual StatusCode | reinitialize () |
virtual StatusCode | restart () |
virtual bool | isExecuted () const |
virtual void | setExecuted (bool state) |
virtual void | resetExecuted () |
virtual StatusCode | beginRun () |
virtual StatusCode | endRun () |
virtual Gaudi::StateMachine::State | FSMState () const |
virtual Gaudi::StateMachine::State | targetFSMState () const |
virtual bool | isEnabled () const |
virtual bool | filterPassed () const |
virtual void | setFilterPassed (bool state) |
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const |
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const |
void | setOutputLevel (int level) |
IAuditorSvc * | auditorSvc () const |
IChronoStatSvc * | chronoSvc () const |
IChronoStatSvc * | chronoStatService () const |
IDataProviderSvc * | detSvc () const |
IDataProviderSvc * | detDataService () const |
IConversionSvc * | detCnvSvc () const |
IConversionSvc * | detDataCnvService () const |
IDataProviderSvc * | eventSvc () const |
IDataProviderSvc * | evtSvc () const |
IDataProviderSvc * | eventDataService () const |
IConversionSvc * | eventCnvSvc () const |
IConversionSvc * | eventDataCnvService () const |
IHistogramSvc * | histoSvc () const |
IHistogramSvc * | histogramDataService () const |
IMessageSvc * | msgSvc () const |
IMessageSvc * | messageService () const |
INTupleSvc * | ntupleSvc () const |
INTupleSvc * | ntupleService () const |
IRndmGenSvc * | randSvc () const |
IToolSvc * | toolSvc () const |
IExceptionSvc * | exceptionSvc () const |
ISvcLocator * | serviceLocator () const |
ISvcLocator * | svcLoc () const |
StatusCode | createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg) |
std::vector< Algorithm * > * | subAlgorithms () const |
virtual StatusCode | setProperty (const Property &p) |
virtual StatusCode | setProperty (const std::string &s) |
virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
virtual StatusCode | getProperty (Property *p) const |
virtual const Property & | getProperty (const std::string &name) const |
virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
virtual const std::vector< Property * > & | getProperties () const |
StatusCode | setProperties () |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
IMonitorSvc * | monitorSvc () const |
void | declareInfo (const std::string &name, const T &var, const std::string &desc) const |
void | declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const |
unsigned long | addRef () |
StatusCode | queryInterface (const InterfaceID &riid, void **) |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
Public Attributes | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
Protected Types | |
typedef std::map< std::string, StatEntity > | Statistics |
typedef std::map< std::string, unsigned int > | Counter |
typedef std::vector< IAlgTool * > | AlgTools |
typedef std::pair< IInterface *, std::string > | ServiceEntry |
typedef std::vector< ServiceEntry > | Services |
Protected Member Functions | |
DayaBay::RandomHeader * | MakeHeaderObject () |
Sub classes should call this towards the beginning of execute(), and certainly before any random numbers are consumed. | |
void | InitializeHeader (DayaBay::HeaderObject *header) |
Initialize new header object. Set exec number, job id, etc. | |
void | AppendInputHeader (const DayaBay::HeaderObject *header) const |
Explicitly add an input header that was retrieved directly instead of through this classes get* methods. | |
StatusCode | releaseTool (const IAlgTool *tool) const |
StatusCode | releaseSvc (const IInterface *svc) const |
bool | isInitialized () const |
bool | isFinalized () const |
int | outputLevel () const |
IntegerProperty & | outputLevelProperty () |
void | initOutputLevel (Property &prop) |
Protected Attributes | |
DayaBay::HeaderObject * | m_headerObject |
bool | m_pullMode |
runing mode, push or pull | |
std::string | m_location |
Property: Location. | |
Static Protected Attributes | |
static const bool | IgnoreRootInTES |
static const bool | UseRootInTES |
Private Member Functions | |
std::vector< long > | seed () |
Private Attributes | |
IRndmGenSvc * | m_rndSvc |
IRndmEngine * | m_engine |
std::string | m_engineName |
int | m_hostid |
Property: HostID - Host ID (as output by, eg, hostid command, if given in hex preface with 0x). | |
int | m_run |
Property: Run - run number. | |
int | m_countOffset |
Property: Count - execution count top level algorithm chain. | |
int | m_burnCount |
Property: burnCount - number of random numbers to burn with a new seed. | |
bool | m_dohash |
Property: Hash - if true, hash the seed. | |
std::vector< long > | m_seedvec |
Rndm::Numbers | m_uni |
Definition at line 12 of file DybShuffle.h.
DybShuffle::DybShuffle | ( | const std::string & | name, | |
ISvcLocator * | pSvcLocator | |||
) |
Definition at line 18 of file DybShuffle.cc.
00019 : DybAlgorithm<DayaBay::RandomHeader>(name, pSvcLocator) 00020 , m_hostid(0) 00021 , m_run(1) 00022 , m_countOffset(0) 00023 , m_burnCount(100) 00024 , m_dohash(true) 00025 { 00026 // Part 1: Declare the properties 00027 declareProperty("HostID", m_hostid, "The systems Host 'ID'entification number"); 00028 declareProperty("Run",m_run,"The run number"); 00029 declareProperty("ExecCountOffset",m_countOffset,"Number to add to the execution count"); 00030 declareProperty("BurnCount",m_burnCount,"Number of random numbers to burn with a new seed"); 00031 declareProperty("SeedVec", m_seedvec, "Random seed vector manually"); 00032 declareProperty("Hash", m_dohash, "Hash the seed"); 00033 }
StatusCode DybShuffle::initialize | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 37 of file DybShuffle.cc.
00037 { 00038 00039 // Part 1: Print where you are 00040 verbose() << " DybShuffle initialize()" << endreq; 00041 00042 //Retrieve Engine and write to Header 00043 m_rndSvc = randSvc(); 00044 m_engine = m_rndSvc->engine(); 00045 00046 IProperty* prop=0; 00047 StatusCode sc = m_rndSvc->queryInterface(IProperty::interfaceID(),(void**)&prop); 00048 if (sc.isFailure()) return sc; 00049 00050 m_engineName = prop->getProperty("Engine").toString(); 00051 00052 if (m_uni.initialize(m_rndSvc, Rndm::Flat(0,1)).isFailure()) { 00053 fatal() << "Failed to initialize uniform random numbers" << endreq; 00054 return StatusCode::FAILURE; 00055 } 00056 00057 this->seed(); 00058 00059 return StatusCode::SUCCESS; 00060 }
StatusCode DybShuffle::execute | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 64 of file DybShuffle.cc.
00064 { 00065 00066 verbose() << "DybShuffle execute()" << endreq; 00067 00068 //make output header object 00069 DayaBay::RandomHeader* RndmHead = MakeHeaderObject(); 00070 00071 // wangzhe 00072 // Here the time stamps of earliest and latest are set to zero explicitly 00073 RndmHead->setEarliest(TimeStamp::GetBOT()); 00074 RndmHead->setLatest(TimeStamp::GetBOT()); 00075 // wz 00076 00077 RndmHead->setHEPEngine(m_engineName); 00078 00079 // Don't re-set the seed on first execution as this was done in initialize() 00080 if (this->getExecNum() > 1) { 00081 std::vector<long> NewSeeds = this->seed(); 00082 RndmHead->setRndmSeeds(NewSeeds); 00083 } 00084 00085 return StatusCode::SUCCESS; 00086 }
StatusCode DybShuffle::finalize | ( | ) | [virtual] |
Reimplemented from GaudiAlgorithm.
Definition at line 169 of file DybShuffle.cc.
00169 { 00170 00171 // Part 1: Print where you are 00172 verbose() << "DybShuffle finalize()" << endreq; 00173 00174 return StatusCode::SUCCESS; 00175 }
std::vector< long > DybShuffle::seed | ( | ) | [private] |
Definition at line 88 of file DybShuffle.cc.
00089 { 00090 00091 std::vector<long> NewSeeds; 00092 std::vector<long> CurrSeeds; 00093 00094 if(m_seedvec.size()) 00095 { 00096 NewSeeds=m_seedvec; 00097 } 00098 00099 else 00100 { 00101 00102 //Determine and set seed(s).... some generators use more than one seed. 00103 if (m_hostid == 0) 00104 { 00105 m_hostid = (long) gethostid(); 00106 } 00107 00108 std::bitset<32> a ((long) 0); 00109 std::bitset<32> site ((long) 0); 00110 std::bitset<32> run ((long) 0); 00111 std::bitset<32> evt ((long) 0); 00112 std::bitset<32> seed ((long) 0); 00113 00114 site = (long)m_hostid; 00115 run = m_run; 00116 00117 //iterations on MakeHeader().... or, how many times this execute 00118 // method has been called. Plus offset in order to reproduce 00119 // isolated execution cycle. 00120 evt = m_countOffset + this->getExecNum(); 00121 00122 for ( int i = 32-1-1; i >= 0 ; i-- ) 00123 { 00124 if ( run.test(i) ) a.set(31-1-i) ; 00125 } 00126 00127 seed = (a|evt)^site; 00128 // set highest bit to zero to avoid negative seed 00129 if ( seed.test(31) ) seed.reset(31); 00130 int MySeed = seed.to_ulong(); 00131 00132 if (m_dohash) { 00133 boost::hash<int> hasher; 00134 MySeed = hasher(MySeed); 00135 } 00136 00137 NewSeeds.push_back(MySeed); 00138 00139 debug () << "Run " << m_run 00140 << ", exec# = " << evt.to_ulong() 00141 << ", host = " << (void*)site.to_ulong() 00142 << ", seeds:"; 00143 std::vector<long>::iterator it, done = NewSeeds.end(); 00144 for (it=NewSeeds.begin(); it != done; ++it) { 00145 debug () << " " << *it; 00146 } 00147 debug () << endreq; 00148 00149 } 00150 00151 00152 m_engine->setSeeds(NewSeeds); 00153 m_engine->seeds(CurrSeeds); 00154 gRandom->SetSeed(NewSeeds[0]); 00155 00156 // now that the new seeds are set, burn some random numbers (to avoid correlations) 00157 int irndm; 00158 double b; 00159 for(irndm=0;irndm<m_burnCount;irndm++) 00160 { 00161 b=m_uni(); 00162 } 00163 00164 return NewSeeds; 00165 }
DayaBay::RandomHeader * DybAlgorithm< DayaBay::RandomHeader >::GetCurrentHeaderObject | ( | ) | const [inherited] |
Access last HeaderType HeaderObject made.
DayaBay::RandomHeader * DybAlgorithm< DayaBay::RandomHeader >::MakeHeaderObject | ( | ) | [protected, inherited] |
Sub classes should call this towards the beginning of execute(), and certainly before any random numbers are consumed.
It makes and returns a new object of HeaderType, registers it in the TES and sets all the HeaderObject base class values it can (everything except for the TimeStamp and the input HeaderObjects which the subclass must take care of).
StatusCode DybBaseAlg::sysInitialize | ( | ) | [virtual, inherited] |
Will call initialize().
Reimplemented from GaudiAlgorithm.
Definition at line 29 of file DybBaseAlg.cc.
00030 { 00031 // Call parent 00032 StatusCode sc = this->GaudiAlgorithm::initialize(); 00033 if (sc.isFailure()) return sc; 00034 00035 // This insinuates on GaudiAlgorithm's operation in order to do 00036 // any "dybish" initialization: 00037 // do_dybstuff_init(); 00038 00039 // Trigger calling subclass, back to your regularly scheduled operations 00040 sc = this->Algorithm::sysInitialize(); 00041 if (sc.isFailure()) return sc; 00042 00043 return StatusCode::SUCCESS; 00044 }
StatusCode DybBaseAlg::sysExecute | ( | ) | [virtual, inherited] |
Will call preExecute() execute() and postExecute().
Reimplemented from GaudiAlgorithm.
Definition at line 46 of file DybBaseAlg.cc.
00047 { 00048 if(!m_pullMode) { 00049 if(preExecute().isFailure()) return StatusCode::FAILURE; 00050 } 00051 00052 // Trigger subclass's execute(); 00053 if (this->Algorithm::sysExecute().isFailure()) return StatusCode::FAILURE; 00054 00055 if(!m_pullMode) { 00056 if(postExecute().isFailure()) return StatusCode::FAILURE; 00057 } 00058 00059 return StatusCode::SUCCESS; 00060 }
StatusCode DybBaseAlg::preExecute | ( | ) | [virtual, inherited] |
be called before execute().
Definition at line 62 of file DybBaseAlg.cc.
00063 { 00064 if (!m_saveRandomState) return StatusCode::SUCCESS; 00065 00066 // Get random state 00067 IRndmEngine *engine = 0; 00068 if (randSvc()->queryInterface(IID_IRndmEngine,(void**)&engine).isFailure()) { 00069 warning() << "Could not get IRndmEngine interace from random service, " 00070 "no state saved!" << endreq; 00071 } 00072 else { 00073 engine->rndmState(m_state); 00074 debug () << "Storing random state: ["; 00075 for (size_t ind=0; ind<m_state.size(); ++ind) { 00076 debug () << " " << m_state[ind]; 00077 } 00078 debug () << " ]" << endreq; 00079 } 00080 00081 return StatusCode::SUCCESS; 00082 }
StatusCode DybBaseAlg::postExecute | ( | ) | [virtual, inherited] |
be called after execute().
Definition at line 84 of file DybBaseAlg.cc.
00085 { 00086 // Set some base HeaderObject values 00087 if (m_headerObject) { 00088 m_headerObject->setRandomState(m_state); 00089 const std::vector<const DayaBay::IHeader*> iheaders(m_inputHeaders.begin(),m_inputHeaders.end()); 00090 m_headerObject->setInputHeaders(iheaders); 00091 00092 00093 // Add to TES. This must be done after algorithm has chance to 00094 // fill earliest/latest with non-default values as this put() 00095 // triggers an insert() into the RegistrationSequence. 00096 00097 if (!m_pullMode) { 00098 put(m_headerObject,m_location); 00099 } 00100 } 00101 00102 // Prepare alg for next execution cycle 00103 debug() <<"Clearing " << m_inputHeaders.size() << " cached input headers" << endreq; 00104 m_inputHeaders.clear(); 00105 ++m_execNum; 00106 m_headerObject = 0; // owned by TES 00107 00108 return StatusCode::SUCCESS; 00109 }
StatusCode DybBaseAlg::sysFinalize | ( | ) | [virtual, inherited] |
Will call finalize().
Reimplemented from GaudiAlgorithm.
Definition at line 111 of file DybBaseAlg.cc.
00112 { 00113 if (this->finalize().isFailure()) { 00114 return StatusCode::FAILURE; 00115 } 00116 return this->GaudiAlgorithm::finalize(); 00117 }
IDataProviderSvc * DybBaseAlg::arcSvc | ( | ) | const [inherited] |
void DybBaseAlg::putTES | ( | DataObject * | obj, | |
std::string | location | |||
) | const [inherited] |
Put data in the TES.
It is like a normal put<>() but will build up the full path leading to the location with DataObjects.
Definition at line 153 of file DybBaseAlg.cc.
00154 { 00155 // Look for pre-existing header object or make new one, creating 00156 // the supporting path as we go. 00157 std::string::size_type ind = location.find("/"); // skip initial "/". 00158 while (true) { 00159 ind = location.find("/",ind+1); 00160 if (ind == std::string::npos) { 00161 debug() << "Putting final: " << location << endreq; 00162 put(obj,location); 00163 break; 00164 } 00165 else { 00166 // make the supporting path from simple DataObjects 00167 debug() << "Making intermediate: " << location.substr(0,ind) 00168 << endreq; 00169 getOrCreate<DataObject,DataObject>(location.substr(0,ind)); 00170 } 00171 } 00172 }
TYPE * DybBaseAlg::getTES | ( | std::string | location | ) | const [inherited] |
Access data from the TES.
As a side effect, if this data is a HeaderObject it will be recorded into the current header objects list of input header objects.
Definition at line 123 of file DybBaseAlg.h.
00124 { 00125 TYPE* obj = get<TYPE>(location); 00126 // If object happens to be a HeaderObject, save it in the intputHeaders 00127 DayaBay::HeaderObject* header = dynamic_cast<DayaBay::HeaderObject*>(obj); 00128 if (header) { 00129 if (std::find(m_inputHeaders.begin(),m_inputHeaders.end(),header) == m_inputHeaders.end()) { 00130 this->AppendInputHeader(header); 00131 debug() << "Saved " << m_inputHeaders.size() 00132 << " input headers from TES, latest: " 00133 << header->name() 00134 << endreq; 00135 } 00136 } 00137 return obj; 00138 }
TYPE * DybBaseAlg::getAES | ( | std::string | location, | |
int | index | |||
) | const [inherited] |
Access data from the Archive Event service at the given index.
Index==0 is the most recent. As a side effect, if this data is a HeaderObject it will be recorded into the current header objects list of input header objects.
Definition at line 141 of file DybBaseAlg.h.
00142 { 00143 if (index<0) return 0; 00144 00145 std::vector<DataObject*> vec = this->getAEScollection(location); 00146 if (!vec.size() || index >= vec.size()) return 0; 00147 DataObject* dobj = vec[index]; 00148 TYPE* obj = dynamic_cast<TYPE*>(dobj); 00149 if (!obj) return 0; 00150 00151 DayaBay::HeaderObject* header = dynamic_cast<DayaBay::HeaderObject*>(obj); 00152 if (header) { 00153 if (std::find(m_inputHeaders.begin(),m_inputHeaders.end(),header) == m_inputHeaders.end()) { 00154 this->AppendInputHeader(header); 00155 debug() << "Saved " << m_inputHeaders.size() 00156 << " input headers from TES, latest: " 00157 << header->name() 00158 << endreq; 00159 } 00160 } 00161 00162 return obj; 00163 }
std::vector< DataObject * > DybBaseAlg::getAEScollection | ( | std::string | location | ) | const [inherited] |
Return the list of archived data objects at the given location.
Note: this does NOT automatically add anything into the list of input headers for this algorithm's output. If your subclass uses anything from this list you MUST add it to the input headers manually or people will not know what when in to your output.
Definition at line 175 of file DybBaseAlg.cc.
00176 { 00177 DybArchiveList* lst = get<DybArchiveList>(arcSvc(),location); 00178 if (!lst) return std::vector<DataObject*>(); 00179 return std::vector<DataObject*>(lst->begin(),lst->end()); 00180 }
int DybBaseAlg::getExecNum | ( | ) | [inline, inherited] |
Access current execution ("event") number.
Definition at line 75 of file DybBaseAlg.h.
00075 { return m_execNum; }
std::string DybBaseAlg::Location | ( | ) | const [inline, inherited] |
void DybBaseAlg::InitializeHeader | ( | DayaBay::HeaderObject * | header | ) | [protected, inherited] |
Initialize new header object. Set exec number, job id, etc.
Definition at line 120 of file DybBaseAlg.cc.
00121 { 00122 // Set some standard parameters for this header 00123 00124 // Set execution number 00125 header->setExecNumber(m_execNum); 00126 00127 // Document the ID of the job which made this header 00128 if(!m_jobInfoSvc){ 00129 // Get the job information service 00130 m_jobInfoSvc = svc<IJobInfoSvc>("JobInfoSvc",true); 00131 } 00132 if(m_jobInfoSvc){ 00133 header->setJobId(m_jobInfoSvc->currentJobInfo()->jobId()); 00134 }else{ 00135 warning() << "MakeHeaderObject, failed to get current job ID" << endreq; 00136 } 00137 // Set the header time range 00138 header->setEarliest(TimeStamp::GetBOT()); 00139 header->setLatest(TimeStamp::GetBOT()); 00140 }
void DybBaseAlg::AppendInputHeader | ( | const DayaBay::HeaderObject * | header | ) | const [protected, inherited] |
Explicitly add an input header that was retrieved directly instead of through this classes get* methods.
Definition at line 142 of file DybBaseAlg.cc.
00143 { 00144 m_inputHeaders.push_back(header); 00145 }
IRndmGenSvc* DybShuffle::m_rndSvc [private] |
Definition at line 24 of file DybShuffle.h.
IRndmEngine* DybShuffle::m_engine [private] |
Definition at line 25 of file DybShuffle.h.
std::string DybShuffle::m_engineName [private] |
Definition at line 26 of file DybShuffle.h.
int DybShuffle::m_hostid [private] |
Property: HostID - Host ID (as output by, eg, hostid command, if given in hex preface with 0x).
Definition at line 30 of file DybShuffle.h.
int DybShuffle::m_run [private] |
int DybShuffle::m_countOffset [private] |
Property: Count - execution count top level algorithm chain.
Definition at line 36 of file DybShuffle.h.
int DybShuffle::m_burnCount [private] |
Property: burnCount - number of random numbers to burn with a new seed.
Definition at line 39 of file DybShuffle.h.
bool DybShuffle::m_dohash [private] |
std::vector<long> DybShuffle::m_seedvec [private] |
Definition at line 44 of file DybShuffle.h.
Rndm::Numbers DybShuffle::m_uni [private] |
Definition at line 46 of file DybShuffle.h.
DayaBay::HeaderObject* DybBaseAlg::m_headerObject [protected, inherited] |
Definition at line 89 of file DybBaseAlg.h.
bool DybBaseAlg::m_pullMode [protected, inherited] |
std::string DybBaseAlg::m_location [protected, inherited] |
Property: Location.
Set non-standard TES location for the object this algorithm produces. Default is result of class method HeaderType::defaultLocation().
Definition at line 118 of file DybBaseAlg.h.