 |
ATLAS Offline Software
|
Test Algorithm POOL I/O tests, writes AthenaPoolData objects to the transient store.
More...
#include <AthenaPoolTestDataWriter.h>
|
| AthenaPoolTestDataWriter (const std::string &name, ISvcLocator *pSvcLocator) |
| Algorithm constructor. More...
|
|
| ~AthenaPoolTestDataWriter () |
| Algorithm destructor. More...
|
|
virtual StatusCode | execute () override |
| Algorithm execute once per event. More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Test Algorithm POOL I/O tests, writes AthenaPoolData objects to the transient store.
Definition at line 32 of file AthenaPoolTestDataWriter.h.
◆ StoreGateSvc_t
◆ AthenaPoolTestDataWriter()
AthenaPoolTestDataWriter::AthenaPoolTestDataWriter |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~AthenaPoolTestDataWriter()
AthenaPoolTestDataWriter::~AthenaPoolTestDataWriter |
( |
| ) |
|
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode AthenaPoolTestDataWriter::execute |
( |
| ) |
|
|
overridevirtual |
Algorithm execute once per event.
Definition at line 47 of file AthenaPoolTestDataWriter.cxx.
74 for (
int i = 0;
i < 5; ++
i) {
76 col1->push_back(
data);
81 for (
int i = 10;
i < 15; ++
i) {
83 col2->push_back(
data);
87 for (
int i = 20;
i < 26; ++
i) {
94 col3->push_back(
data);
101 for (;
it != last; ++
it) {
108 for (;
it != last; ++
it) {
115 for (;
it != last; ++
it) {
121 for (
int i = 0;
i < 5; ++
i) {
123 col4->push_back(
data);
128 for (
int i = 10;
i < 15; ++
i) {
130 col5->push_back(
data);
136 for (;
it != last; ++
it) {
143 for (;
it != last; ++
it) {
157 for (;
it != last; ++
it) {
166 for (;
it != last; ++
it) {
197 for (
int i = 0;
i < 3; ++
i ) {
200 for (
int j = 0; j < 2; ++j ) {
201 CLHEP::HepMatrix*
mat =
new CLHEP::HepMatrix( 4 + j, 2 + 2*
i );
202 CLHEP::HepMatrix& matrx = *
mat;
203 for (
int i = 0;
i < matrx.num_row(); ++
i) {
204 for (
int j = 0; j < matrx.num_col(); ++j) {
214 HepGeom::Point3D<double>( 0, 1, 0),
215 HepGeom::Point3D<double>( 0, 0, 1),
216 HepGeom::Point3D<double>(-
i, 0, 0),
217 HepGeom::Point3D<double>( 0, 1, 0),
218 HepGeom::Point3D<double>( 0, 0, 1));
219 matrix->setTransform(trans1);
222 stream <<
"AthenaPoolTestMatrix_" <<
i;
227 const HepGeom::Point3D<double>& point =
matrix->point();
228 const HepGeom::Point3D<double>& point1 =
matrix->point1();
236 << point1.z() <<
" ");
237 const CLHEP::HepMatrix& smallMatrix =
matrix->smallMatrix();
238 ATH_MSG_DEBUG(
" Small matrix : ( " << smallMatrix.num_row() <<
", " << smallMatrix.num_col() <<
" ) " );
241 for (
int i = 0;
i < smallMatrix.num_row(); ++
i) {
242 for (
int j = 0; j < smallMatrix.num_col(); ++ j) {
243 stream << smallMatrix[
i][j] <<
", ";
247 nd += smallMatrix.num_row()*smallMatrix.num_col();
249 const CLHEP::HepMatrix& bigMatrix =
matrix->bigMatrix();
250 ATH_MSG_DEBUG(
" Big matrix : ( " << bigMatrix.num_row() <<
", " << bigMatrix.num_col() <<
" ) " );
253 for (
int i = 0;
i < bigMatrix.num_row(); ++
i) {
254 for (
int j = 0; j < bigMatrix.num_col(); ++ j) {
255 stream << bigMatrix[
i][j] <<
", ";
259 nd += bigMatrix.num_row()*bigMatrix.num_col();
262 for (
int i = 0;
i <
matrix->numberOfMatrices(); ++
i ) {
263 const CLHEP::HepMatrix& matrx =
matrix->matrix(
i );
264 ATH_MSG_DEBUG(
" ( " << matrx.num_row() <<
", " << matrx.num_col() <<
" ) " );
266 for (
int i = 0;
i < matrx.num_row(); ++
i) {
267 for (
int j = 0; j < matrx.num_col(); ++ j) {
273 nd += matrx.num_row()*matrx.num_col();
286 std::map<unsigned int, CLHEP::HepMatrix>& mp0 = mats[0];
287 std::map<unsigned int, CLHEP::HepMatrix>& mp1 = mats[1];
288 std::map<unsigned int, CLHEP::HepMatrix>::const_iterator itmp = mp0.begin();
290 << (*itmp).second.num_row() <<
", " << (*itmp).second.num_col() );
293 << (*itmp).second.num_row() <<
", " << (*itmp).second.num_col() );
296 << (*itmp).second.num_row() <<
", " << (*itmp).second.num_col() );
299 << (*itmp).second.num_row() <<
", " << (*itmp).second.num_col() );
326 typedef std::vector<AthenaPoolTestMapData::Deposit> deposit_vec;
328 deposit_vec deposits;
332 for (
unsigned int j = 0; j < 10; ++j) {
333 for (
unsigned int i = 0;
i < 10; ++
i) {
336 deposit.second =
i + 20;
337 deposits.push_back(deposit);
345 AthenaPoolTestMap::const_iterator itm = tmap.begin();
346 AthenaPoolTestMap::const_iterator endm = tmap.end();
347 for (; itm != endm; ++itm) {
350 (*itm).second.deposits(deposits);
352 for (
unsigned int i = 0;
i < deposits.size(); ++
i) {
356 << deposits[
i].second <<
" ";
359 <<
" word " << (*itm).second.word()
360 <<
" Deposits: (barCode, evtIndx, wgt) " <<
stream.str());
368 const std::vector<dummy_B>&
b = dummyA->
dummy();
370 for (
unsigned int i = 0;
i <
b.size(); ++
i) {
371 const std::vector<dummy_C>&
c =
b[
i].dummy();
373 for (
unsigned int j = 0; j <
c.size(); ++j) {
383 const std::vector<const dummy_D*>&
d = dummyE->
dummy();
385 for (
unsigned int i = 0;
i <
d.size(); ++
i) {
402 <<
evt->event_ID()->run_number() <<
","
403 <<
evt->event_ID()->event_number() <<
":"
404 <<
evt->event_ID()->time_stamp() <<
"] " );
406 <<
evt->event_type()->user_type() <<
" weight 0: "
418 unsigned int flags = 0;
423 ATH_MSG_ERROR(
"Error setting flag: i, flags " <<
i <<
" " << MSG::hex <<
flags << MSG::dec );
452 ATH_MSG_DEBUG(
"Returned false for trying to set bit 29 for subDet " <<
i <<
" "
460 ATH_MSG_ERROR(
"Error setting error state: i, state " <<
i <<
" " << state );
463 ATH_MSG_DEBUG(
"Setting error state: i, state " <<
i <<
" " << state );
476 evt->event_ID()->event_number(),
490 std::vector<unsigned int> level1TriggerInfo;
491 level1TriggerInfo.push_back(14);
492 level1TriggerInfo.push_back(15);
493 std::vector<unsigned int> level2TriggerInfo;
494 level2TriggerInfo.push_back(10);
495 level2TriggerInfo.push_back(11);
496 std::vector<unsigned int> eventFilterInfo;
497 eventFilterInfo.push_back(12);
498 eventFilterInfo.push_back(13);
499 std::vector<TriggerInfo::StreamTag> streamTags;
511 auto newEvt = std::make_unique<EventInfo>(*
evt);
522 << pevt->
event_ID()->run_number() <<
","
523 << pevt->
event_ID()->event_number() <<
":"
524 << pevt->
event_ID()->time_stamp() <<
"] ");
541 stream <<
"EventFilterInfo ";
545 stream <<
"EventFilterInfo ";
560 for (; it1 != end1; ++it1) {
563 << (*it1).time() <<
" " << (*it1).index()
567 << sevt->
event_ID()->run_number() <<
","
568 << sevt->
event_ID()->event_number() <<
":"
569 << sevt->
event_ID()->time_stamp() <<
"] ");
573 << it1->time() <<
" " << it1->index());
579 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_partialCreate
Gaudi::Property<bool> AthenaPoolTestDataWriter::m_partialCreate {this, "PartialCreate", false} |
|
private |
◆ m_readFirstHalf
Gaudi::Property<bool> AthenaPoolTestDataWriter::m_readFirstHalf {this, "ReadFirstHalf", false} |
|
private |
◆ m_readOtherHalf
Gaudi::Property<bool> AthenaPoolTestDataWriter::m_readOtherHalf {this, "ReadOtherHalf", false} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
char data[hepevt_bytes_allocation_ATLAS]
bool isEventFlagBitSet(EventFlagSubDet subDet, unsigned char bit) const
check for a event flag bit for a particular sub-detector
std::string user_type(void) const
Access to user type.
Const iterator class for DataVector/DataList.
const std::vector< StreamTag > & streamTags() const
get stream tags
index_type eventIndex() const
float averageInteractionsPerCrossing() const
average interactions per crossing for all BCIDs - for out-of-time pile-up
Gaudi::Property< bool > m_readOtherHalf
For partial create read second half of collections.
std::vector< std::map< unsigned int, CLHEP::HepMatrix > > matrixMaps_t
This class represents the "type of event" where the type is given by one or more "characteristics".
Gaudi::Property< bool > m_partialCreate
Create only part of the collections.
Simple class with int,int,float,double for testing pool i/o from Athena.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
float mc_event_weight(unsigned int iweight=0) const
Access to MC weight.
Interface class for AthenaPoolTest i/o tests with DataVector.
EventFlagErrorState errorState(EventFlagSubDet subDet) const
return error state for a particular sub-detector
virtual void setOwner(IDataHandleHolder *o)=0
bool setEventFlagBit(EventFlagSubDet subDet, unsigned char bit, bool set=true)
Set a bit for an event flag of a particular sub detector.
const std::vector< number_type > & level1TriggerInfo() const
get level1 trigger info
DataVector< IAthenaPoolTestData > IAthenaPoolTestCollection
Simple class with HepGeom::Point3D<double> for testing pool i/o from Athena.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool setErrorState(EventFlagSubDet subDet, EventFlagErrorState errorState)
Set error state flag for a particular sub detector.
SubEvent::iterator beginSubEvt()
Gaudi::Property< bool > m_readFirstHalf
For partial create read first half of collections.
void setActualInteractionsPerCrossing(float interactions)
Setting the number of interactions per crossing:
Simple class with two int's for testing pool i/o from Athena.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
unsigned int eventFlags(EventFlagSubDet subDet) const
event flags for a particular sub-detector
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old PileUpEventInfo
const std::vector< number_type > & level2TriggerInfo() const
get level2 trigger info
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
EventID * event_ID()
the unique identification of the event.
Eigen::Affine3d Transform3D
void addSubEvt(time_type t, PileUpTimeEventIndex::PileUpType puType, const EventInfo *pse, StoreGateSvc *psg)
setter for the subEvt collection t=0(ns) for the original event
std::pair< AthenaPoolTestMapDataLink, float > Deposit
Interface class for AthenaPoolTest i/o tests.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Simple class with four int's divided among protected/private for testing pool i/o from Athena.
number_type level1TriggerType() const
get level1 trigger type
void setAverageInteractionsPerCrossing(float interactions)
average interactions per crossing for all BCIDs - for out-of-time pile-up
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
test nested vectors - problem seen in root3/4 transition
This class contains trigger related information.
This class provides general information about an event. Event information is provided by the accessor...
const std::vector< const dummy_D * > & dummy() const
void set_mc_event_weight(float weight, unsigned int iweight=0, unsigned int nWeightsMax=0)
Add in MC weight. For more than 1 weight, add with iweight > 0.
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
DataObjIDColl m_extendedExtraObjects
number_type extendedLevel1ID() const
get extended level1 ID
const std::vector< number_type > & eventFilterInfo() const
get event filter trigger info
void set_user_type(const std::string &user_type)
Add user (string) type.
Test derived class that contains a list of parent classes.
#define ATH_MSG_WARNING(x)
std::list< SubEvent >::const_iterator const_iterator
TriggerInfo * trigger_info()
trigger information (ptr may be NULL)
bool setEventFlags(EventFlagSubDet subDet, unsigned int flags)
Set event flag for a particular sub detector - maximun size is 28 bits.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
const std::vector< dummy_B > & dummy() const
Simple class with various CLHEP classes for testing pool i/o from Athena.
number_type statusElement() const
get status element
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
SubEvent::iterator endSubEvt()
float actualInteractionsPerCrossing() const
Access to number of interactions per crossing: