![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
This class provides the converter to customize the saving of DataHeader.
More...
#include <DataHeaderCnv.h>
|
virtual PERS * | createPersistent (TRANS *obj)=0 |
|
virtual PERS * | createPersistentWithKey (TRANS *obj, const std::string &) override |
| method to be implemented by the developer. More...
|
|
virtual TRANS * | createTransientWithKey (const std::string &) override |
| method to be implemented by the developer. More...
|
|
template<class P > |
P * | poolReadObject () |
| Read object of type P. More...
|
|
template<class P > |
void | poolReadObject (TopLevelTPCnvBase &tlp_converter) |
| Read object of type P (plus all extending objects) using the indicated top-level TP converter. More...
|
|
void | keepPoolObj (PERS *obj, const std::string &output) |
| Remember the POOL object to be written out (will be deleted after commit) More...
|
|
virtual StatusCode | transToPers (TRANS *, PERS *&) override |
| Obsolete methods replaced by createPersistent() and createTransient() obsolete. More...
|
|
virtual StatusCode | persToTrans (TRANS *&, PERS *) override |
| obsolete More...
|
|
virtual StatusCode | DataObjectToPers (DataObject *pObj, IOpaqueAddress *&pAddr) override |
| Convert an object into Persistent. More...
|
|
virtual StatusCode | PoolToDataObject (DataObject *&pObj, const Token *token, const std::string &key) override |
| Read an object from POOL. More...
|
|
virtual StatusCode | cleanUp (const std::string &output) override |
| Callback from the CleanupSvc to delete persistent object in the local list. More...
|
|
template<class P > |
Placement | setPlacementForP (P &p, const std::string &key, const std::string &output) |
| Set POOL placement for type P. More...
|
|
template<class P > |
StatusCode | objectToPool (P *pObj, Token *&token, const std::string &key, const std::string &output) |
| Write an object into POOL returning its token. More...
|
|
template<class P > |
StatusCode | poolToObject (const Token *&token, P *&pObj) |
| Read an object from POOL. More...
|
|
virtual bool | compareClassGuid (const Guid &clid) const |
| Compare POOL class GUID with the one of the object being read. More...
|
|
virtual void | setToken (const std::string &token) |
| Set the token (in std::string representation) and classID for the object that will be read next. More...
|
|
virtual Placement | setPlacement (const std::string &key, const std::string &output) |
| Set POOL placement. More...
|
|
virtual Placement | setPlacementWithType (const std::string &tname, const std::string &key, const std::string &output) |
| Set POOL placement hint for a given type. More...
|
|
virtual const DataObject * | getDataObject () const |
|
double | phiCorr (double phi) |
|
void | ipCorr (double d0, double z0, double &d0c, double &z0c, double phi0, double eta, double pt) |
|
|
std::map< DataObject *, PERS * > | m_persMap |
|
std::string | m_nm |
| Message source name. More...
|
|
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) More...
|
|
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. More...
|
|
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. More...
|
|
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) More...
|
|
This class provides the converter to customize the saving of DataHeader.
Definition at line 31 of file DataHeaderCnv.h.
◆ BaseType
template<class TRANS , class PERS >
◆ CallMutex
◆ ClassMap
◆ ClassMapIt
◆ DataHeaderCnv()
DataHeaderCnv::DataHeaderCnv |
( |
ISvcLocator * |
svcloc | ) |
|
◆ ~DataHeaderCnv()
DataHeaderCnv::~DataHeaderCnv |
( |
| ) |
|
Definition at line 36 of file DataHeaderCnv.cxx.
40 if( incSvc.retrieve().isSuccess() ) {
41 incSvc->removeListener(
this, IncidentType::EndInputFile);
◆ addTrack()
◆ classID()
template<class TRANS , class PERS >
◆ cleanUp()
template<class TRANS , class PERS >
|
overrideprotectedvirtualinherited |
Callback from the CleanupSvc to delete persistent object in the local list.
Reimplemented from AthenaPoolConverter.
◆ clear()
void Converter::clear |
( |
| ) |
|
|
inlineinherited |
◆ clearInputDHFormCache()
void DataHeaderCnv::clearInputDHFormCache |
( |
const std::string & |
dbGuid | ) |
|
Delete cached DHForms for a given input file GUID.
Definition at line 95 of file DataHeaderCnv.cxx.
99 size_t dbpos = iter->first.find(
"[DB=");
100 if( dbpos != std::string::npos && iter->first.compare(dbpos+4, dbpos+36, dbGuid) == 0 ) {
◆ compareClassGuid()
template<class TRANS , class PERS >
|
protectedvirtualinherited |
Compare POOL class GUID with the one of the object being read.
- Parameters
-
- Returns
- true if the type of the object about to be read matches the GUID
◆ createObj()
StatusCode AthenaPoolConverter::createObj |
( |
IOpaqueAddress * |
pAddr, |
|
|
DataObject *& |
pObj |
|
) |
| |
|
overridevirtualinherited |
Create a transient object from a POOL persistent representation.
- Parameters
-
pAddr | [IN] IOpaqueAddress of POOL persistent representation. |
pObj | [OUT] pointer to the transient object. |
Reimplemented in T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >, T_AthenaPoolCoolMultChanCnv< LArHVScaleCorrComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >, and T_AthenaPoolCoolMultChanCnv< TransientClass, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >.
Definition at line 64 of file AthenaPoolConverter.cxx.
67 bool ownTokAddr =
false;
68 if (tokAddr ==
nullptr || tokAddr->
getToken() ==
nullptr) {
72 GenericAddress* genAddr =
dynamic_cast<GenericAddress*
>(pAddr);
74 ATH_MSG_ERROR(
"Dynamic cast failed in AthenaPoolConverter::createObj");
77 return StatusCode::FAILURE;
83 ::sprintf(
text,
"[CTXT=%08X]",
static_cast<int>(*(pAddr->ipar())));
91 std::string
key = pAddr->par()[1];
100 if (pObj ==
nullptr) {
104 delete tokAddr; tokAddr =
nullptr;
107 if (pObj ==
nullptr) {
108 return(StatusCode::FAILURE);
110 return(StatusCode::SUCCESS);
◆ createPersistent() [1/3]
◆ createPersistent() [2/3]
◆ createPersistent() [3/3]
template<class TRANS , class PERS >
|
protectedpure virtualinherited |
Implemented in ZdcRawChannelCollectionCnv, TruthParticleContainerCnv, TruthEtIsolationsContainerCnv, TRTUncompressedHitCollectionCnv, TrigTauTracksInfoCnv, TrigTauClusterDetailsCnv, TrigTauClusterCnv, TrigTauCnv, TrigRoiDescriptorCollectionCnv, TrigRoiDescriptorCnv, TrigRNNOutputCnv, TrigOperationalInfoCollectionCnv, TrigOperationalInfoCnv, TrigMonEventCollectionCnv, TrigMonEventCnv, TrigMonConfigCollectionCnv, TrigMonConfigCnv, TrigEMClusterCnv, TrigCompositeCnv, T_AthenaPoolViewVectorCnv< DV >, T_AthenaPoolLegacyCnv< TRANS, PERS, LEGACY >::LegacyCnv, T_AthenaPoolLegacyCnv< TRANS, PERS, LEGACY >, TrackRecordCollectionCnv, TileTTL1ContainerCnv, TileRawChannelContainerCnv, TileMuonReceiverContainerCnv, TileMuContainerCnv, TileL2ContainerCnv, TileHitVectorCnv, TileHitContainerCnv, TileDigitsContainerCnv, TileCosmicMuonContainerCnv, TileBeamElemContainerCnv, LArRawEventContainerCnv< T, P, C >, MuonRdoContainerTPCnv< T, P, CONV >, SimulationHitCollectionCnv, SiHitCollectionCnv, RingerRingsCnv, RecoTimingObjCnv, MuonSpShowerContainerCnv, PhotonContainerCnv, MuonCaloEnergyContainerCnv, MissingEtTruthCnv, MissingEtCaloCnv, MissingETCnv, McEventCollectionCnv, LArTTL1ContainerCnv, LArHitFloatContainerCnv, LArHitContainerCnv, IParticleLinkContainerCnv, InDetLowBetaCandidateCnv, INav4MomLinkContainerCnv, INav4MomAssocsCnv, ElectronContainerCnv, egDetailContainerCnv, egammaContainerCnv, eflowObjectContainerCnv, CaloRingsContainerCnv, CaloCalibrationHitContainerCnv, BCM_RDO_ContainerCnv, AthExFatObjectCnv, AthExElephantinoCnv, AthExDecayCnv, MuonContainerCnv, TauJetContainerCnv, TauDetailsContainerCnv, ALFA_ODHitCollectionCnv, ALFA_ODDigitCollectionCnv, ALFA_LocRecODEvCollectionCnv, ALFA_LocRecEvCollectionCnv, ALFA_LocRecCorrODEvCollectionCnv, ALFA_LocRecCorrEvCollectionCnv, ALFA_HitCollectionCnv, ALFA_GloRecEvCollectionCnv, ALFA_DigitCollectionCnv, ALFA_CLinkEventCnv, AFP_TDSimHitCollectionCnv, AFP_TDLocRecoEvCollectionCnv, AFP_TDDigiCollectionCnv, AFP_SIDSimHitCollectionCnv, AFP_SIDLocRecoEvCollectionCnv, and AFP_SiDigiCollectionCnv.
◆ createPersistentWithKey()
template<class TRANS , class PERS >
|
overrideprotectedvirtualinherited |
method to be implemented by the developer.
It should create the persistent representation of the object, using the default top-level TP converter.
- Parameters
-
- Returns
- the created persistent representation (by pointer)
Implements T_AthenaPoolCustomCnvWithKey< TRANS, PERS >.
◆ createRep()
StatusCode AthenaPoolConverter::createRep |
( |
DataObject * |
pObj, |
|
|
IOpaqueAddress *& |
pAddr |
|
) |
| |
|
overridevirtualinherited |
◆ createTransient()
Implements T_AthenaPoolCustomCnv< TRANS, PERS >.
Definition at line 417 of file DataHeaderCnv.cxx.
423 std::string bestPfn, fileType;
430 static const pool::Guid p6_guid(
"4DDBD295-EFCE-472A-9EC8-15CD35A9EB8D");
431 static const pool::Guid p5_guid(
"D82968A1-CF91-4320-B2DD-E0F739CBC7E6");
432 static const pool::Guid p4_guid(
"9630EB7B-CCD7-47D9-A39B-CBBF4133CDF2");
433 static const pool::Guid p3_guid(
"EC1318F0-8E28-45F8-9A2D-2597C1CC87A6");
447 std::unique_ptr<DataHeader_p4> obj_p4(this->poolReadObject<DataHeader_p4>());
451 std::unique_ptr<DataHeader_p3> obj_p3(this->poolReadObject<DataHeader_p3>());
457 std::string
error =
e.what();
458 throw std::runtime_error(
error);
◆ createTransientWithKey()
template<class TRANS , class PERS >
|
overrideprotectedvirtualinherited |
method to be implemented by the developer.
It has to find out the type of the persistent object to be read (by comparing GUIDs), read it using poolReadObject<P>(), call TLP converter to create a transient representation and return it. if the version 1 of poolReadObject is used, the persistent object HAS TO BE DELETED manually.
Implements T_AthenaPoolCustomCnvWithKey< TRANS, PERS >.
◆ DataObjectToPers()
template<class TRANS , class PERS >
|
overrideprotectedvirtualinherited |
Convert an object into Persistent.
- Parameters
-
pObj | [IN] pointer to the transient object. |
key | [IN] StoreGate key (string) - placement hint to generate POOL container name |
Reimplemented from T_AthenaPoolCustCnv< TRANS, PERS >.
◆ DataObjectToPool()
StatusCode DataHeaderCnv::DataObjectToPool |
( |
IOpaqueAddress * |
pAddr, |
|
|
DataObject * |
pObj |
|
) |
| |
|
overridevirtual |
Write an object into POOL.
- Parameters
-
pObj | [IN] pointer to the transient object. |
key | [IN] StoreGate key (string) - placement hint to generate POOL container name |
Reimplemented from T_AthenaPoolCustomCnvWithKey< TRANS, PERS >.
Definition at line 178 of file DataHeaderCnv.cxx.
182 ATH_MSG_ERROR(
"Failed to cast DataHeader to transient type" );
183 return(StatusCode::FAILURE);
188 const std::string connection = dh_placement.
fileName();
193 std::string form_placement_str = dhf_placement.
toString();
195 std::unique_ptr<DataHeaderForm_p6>& dhForm =
m_persFormMap[form_placement_str];
196 if (dhForm ==
nullptr) {
198 dhForm = std::make_unique<DataHeaderForm_p6>();
206 ATH_MSG_FATAL(
"Failed to convert DataHeader to persistent type: " <<
e.what());
207 return(StatusCode::FAILURE);
214 if (dh_token ==
nullptr) {
216 return(StatusCode::FAILURE);
225 static const RootType dhFormType(
typeid(*dhForm));
227 if (dhf_token ==
nullptr) {
229 return(StatusCode::FAILURE);
237 dhf_token->
release(); dhf_token =
nullptr;
247 if (
list !=
nullptr) {
251 obj->getEvtRefTokenStr().c_str(),
253 delete ref_token; ref_token =
nullptr;
254 for (coral::AttributeList::const_iterator iter =
list->begin(), last =
list->end(); iter != last; ++iter) {
255 attr_placement = this->
setPlacementWithType(
"AttributeList", (*iter).specification().name(), *pAddr->par());
257 (*iter).addressOfData(),
258 RootType((*iter).specification().type()) );
259 delete attr_token; attr_token =
nullptr;
263 if (tokAddr !=
nullptr) {
264 tokAddr->
setToken(dh_token); dh_token =
nullptr;
266 delete dh_token; dh_token =
nullptr;
267 return(StatusCode::FAILURE);
269 return(StatusCode::SUCCESS);
◆ fillRepRefs()
StatusCode AthenaPoolConverter::fillRepRefs |
( |
IOpaqueAddress * |
pAddr, |
|
|
DataObject * |
pObj |
|
) |
| |
|
overridevirtualinherited |
◆ finalize()
StatusCode AthenaPoolConverter::finalize |
( |
| ) |
|
|
overridevirtualinherited |
◆ getDataObject()
const DataObject * AthenaPoolConverter::getDataObject |
( |
| ) |
const |
|
protectedvirtualinherited |
◆ handle()
void DataHeaderCnv::handle |
( |
const Incident & |
incident | ) |
|
|
overridevirtual |
Incident service handle listening for EndInputFile.
Definition at line 82 of file DataHeaderCnv.cxx.
84 if( incident.type() ==
"PreFork" ) {
87 if( incident.type() == IncidentType::EndInputFile ) {
89 const std::string&
guid =
static_cast<const FileIncident&
>(incident).fileGuid();
◆ initialize()
StatusCode DataHeaderCnv::initialize |
( |
| ) |
|
|
overridevirtual |
Gaudi Service Interface method implementations:
Reimplemented from T_AthenaPoolCustCnv< TRANS, PERS >.
Definition at line 45 of file DataHeaderCnv.cxx.
49 bool doFilterDHAliases =
true;
50 IConversionSvc* cnvSvc(
nullptr);
51 if( service(
"AthenaPoolCnvSvc", cnvSvc,
true ).isSuccess() ) {
52 IProperty* prop =
dynamic_cast<IProperty*
>( cnvSvc );
55 if( prop->getProperty(&sizeProp).isSuccess() ) {
58 BooleanProperty aliasFilterProp(
"doFilterDHAliases", doFilterDHAliases);
59 if( prop->getProperty(&aliasFilterProp).isSuccess() ) {
60 doFilterDHAliases = aliasFilterProp.value();
65 if( doFilterDHAliases ) {
76 incSvc->addListener(
this, IncidentType::EndInputFile, 0);
77 incSvc->addListener(
this,
"PreFork", 0);
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ ipCorr()
void Converter::ipCorr |
( |
double |
d0, |
|
|
double |
z0, |
|
|
double & |
d0c, |
|
|
double & |
z0c, |
|
|
double |
phi0, |
|
|
double |
eta, |
|
|
double |
pt |
|
) |
| |
|
inlineprotectedinherited |
Definition at line 257 of file Converter.h.
261 double sd0 = (
d0 != 0 ?
d0/fabs(
d0) : 1);
262 double spt = (
pt != 0 ?
pt/fabs(
pt) : 1);
270 double rc = fabs(
pt)*15.0/(9.0*1.042);
276 double xd01,yd01,xd02,yd02;
279 xd01 = 0; yd01 =
rc+yc;
280 xd02 = 0; yd02 = -
rc+yc;
282 xd01 = xc+yc/xc*yc+sqrt(
pow((xc+yc/xc*yc),2)-xc*xc-yc*yc+rc*rc); yd01 = yc/xc*xd01;
283 xd02 = xc+yc/xc*yc-sqrt(
pow((xc+yc/xc*yc),2)-xc*xc-yc*yc+rc*rc); yd02 = yc/xc*xd02;
286 double r1 = sqrt(xd01*xd01+yd01*yd01);
287 double r2 = sqrt(xd02*xd02+yd02*yd02);
292 phiV = atan2(yd01,xd01);
294 phiV = atan2(yd02,xd02);
304 d0c = fabs(sqrt(xc*xc+yc*yc)-rc)*
sin(phiV-newphi);
307 double theta_save=
theta;
◆ keepPoolObj()
template<class TRANS , class PERS >
Remember the POOL object to be written out (will be deleted after commit)
- Parameters
-
obj | [IN] persistent object |
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ objectToPool()
template<class TRANS , class PERS >
template<class P >
Write an object into POOL returning its token.
- Parameters
-
pObj | [IN] pointer to the object to be written. |
token | [OUT] POOL token of the persistent representation. |
key | [IN] StoreGate key (string) - placement hint to generate POOL container name |
◆ persToTrans()
template<class TRANS , class PERS >
|
inlineoverrideprotectedvirtualinherited |
◆ phiCorr()
double Converter::phiCorr |
( |
double |
phi | ) |
|
|
inlineprotectedinherited |
Definition at line 248 of file Converter.h.
250 if (
phi < -TMath::Pi())
phi += 2*TMath::Pi();
251 if (
phi > TMath::Pi())
phi -= 2*TMath::Pi();
◆ poolReadObject() [1/2]
template<class TRANS , class PERS >
template<class P >
Read object of type P.
This is an exception-throwing version of poolToObject() plus reading of all extending objects. Version 1 - (see createTransient() above)
- Returns
- object read from POOL (by pointer)
◆ poolReadObject() [2/2]
template<class TRANS , class PERS >
template<class P >
Read object of type P (plus all extending objects) using the indicated top-level TP converter.
Version 2 - (see createTransient() above) NOTE: the TLP converter will delete the persistent object after createTransient()
- Parameters
-
tlp_converter | [IN] top-level TP converter to be used when reading |
◆ poolReadObject_p5()
std::unique_ptr< DataHeader_p5 > DataHeaderCnv::poolReadObject_p5 |
( |
| ) |
|
Definition at line 273 of file DataHeaderCnv.cxx.
275 void* voidPtr1 =
nullptr;
277 if (voidPtr1 ==
nullptr) {
282 void* voidPtr2 =
nullptr;
289 if (voidPtr2 ==
nullptr) {
290 throw std::runtime_error(
"Could not get object for token = " + mapToken.
toString());
◆ poolReadObject_p6()
std::unique_ptr< DataHeader_p6 > DataHeaderCnv::poolReadObject_p6 |
( |
| ) |
|
Definition at line 302 of file DataHeaderCnv.cxx.
304 void* voidPtr1 =
nullptr;
305 std::string error_message;
310 error_message =
err.what();
312 if (voidPtr1 ==
nullptr) {
313 throw std::runtime_error(
"Could not get object for token = " +
m_i_poolToken->
toString() +
", " + error_message);
318 std::string dhFormToken =
header->dhFormToken();
321 size_t dbpos = dhFormToken.find(
"[DB=");
322 if( dbpos != std::string::npos ) {
323 const std::string dbGuid = dhFormToken.substr(dbpos+4, dbpos+36);
331 void* voidPtr2 =
nullptr;
333 if( dhFormToken.empty() ) {
335 mapToken.
setClassID(
Guid(
"7BE56CEF-C866-4BEE-9348-A5F34B5F1DAD") );
345 error_message =
err.what();
347 if (voidPtr2 ==
nullptr) {
353 void* firstPtr1 =
nullptr;
358 error_message =
err.what();
360 if (firstPtr1 ==
nullptr)
throw std::runtime_error(
"Could not get first DataHeader for token = " + firstToken.
toString() +
", " + error_message);
363 std::unique_ptr<DataHeader_p6> firstHeader(
reinterpret_cast<DataHeader_p6*
>(firstPtr1) );
364 dhFormToken = firstHeader->dhFormToken();
373 error_message =
err.what();
375 if (voidPtr2 ==
nullptr)
throw std::runtime_error(
"Could not get DataHeaderForm for token = " + mapToken.
toString() +
", " + error_message);
378 ATH_MSG_WARNING(
"DataHeaderForm read exception: " << error_message <<
" - reusing the last good DHForm");
381 ATH_MSG_WARNING(
"DataHeaderForm read exception: " << error_message <<
" - reusing the last good DHForm");
386 if (voidPtr2 ==
nullptr) {
387 throw std::runtime_error(
"Could not get object for token = " + mapToken.
toString());
◆ PoolToDataObject()
template<class TRANS , class PERS >
|
overrideprotectedvirtualinherited |
Read an object from POOL.
- Parameters
-
pObj | [OUT] pointer to the transient object. |
token | [IN] POOL token of the persistent representation. |
key | [IN] SG key of the object being read. |
Reimplemented from T_AthenaPoolCustCnv< TRANS, PERS >.
◆ poolToObject()
template<class TRANS , class PERS >
template<class P >
Read an object from POOL.
- Parameters
-
token | [IN] POOL token of the persistent representation. |
pObj | [OUT] pointer to the object read. |
◆ removeBadElements()
void DataHeaderCnv::removeBadElements |
( |
DataHeader * |
dh | ) |
|
Remove DataHeaderElements with incomplete (dbID="") refs.
Definition at line 403 of file DataHeaderCnv.cxx.
405 auto iter =
dh->m_inputDataHeader.begin();
406 while( iter !=
dh->m_inputDataHeader.end() ) {
407 if( iter->getToken()->dbID() ==
Guid::null() ) {
409 iter =
dh->m_inputDataHeader.erase(iter);
◆ repSvcType()
long AthenaPoolConverter::repSvcType |
( |
| ) |
const |
|
overridevirtualinherited |
◆ selectTracks() [1/3]
Definition at line 177 of file Converter.h.
179 static int hpmap[20] = { 0, 1, 2, 7, 8, 9, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
184 while(muonitr!=muonend) {
186 bool hasInDet = (*muonitr)->hasInDetTrackParticle();
188 if(hasInDet) trackitr=(*muonitr)->inDetTrackParticle();
190 if(!hasInDet)
continue;
194 CLHEP::HepVector perigeeParams = measPer->parameters();
195 double pT = measPer->pT();
196 double eta = measPer->eta();
223 double dof = quality->quality->
numberDoF();
227 for (
int ih=0 ; ih<20 ; ih++ ) {
236 deta, dphi, dz0, dd0, dpT,
238 nStrawHits, nTrHits, bitmap, 0,
◆ selectTracks() [2/3]
Definition at line 111 of file Converter.h.
116 static int hpmap[20] = { 0, 1, 2, 7, 8, 9, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
118 while ( trackitr!=trackend ) {
122 CLHEP::HepVector perigeeParams = measPer->parameters();
123 double pT = measPer->pT();
124 double eta = measPer->eta();
147 bool expectBL =
false;
155 for (
int ih=0 ; ih<20 ; ih++ ) {
164 deta, dphi, dz0, dd0, dpT,
166 nStrawHits, nTrHits, bitmap, 0,
◆ selectTracks() [3/3]
Definition at line 56 of file Converter.h.
61 while ( trackitr!=trackend ) {
63 double eta = (*trackitr)->param()->eta();
64 double phi = (*trackitr)->param()->phi0();
65 double z0 = (*trackitr)->param()->z0();
66 double pT = (*trackitr)->param()->pT();
67 double d0 = (*trackitr)->param()->a0();
70 double deta = (*trackitr)->param()->eeta();
71 double dphi = (*trackitr)->param()->ephi0();
72 double dz0 = (*trackitr)->param()->ez0();
73 double dpT = (*trackitr)->param()->epT();
74 double dd0 = (*trackitr)->param()->ea0();
76 int algoid = (*trackitr)->algorithmId();
78 int nBlayerHits = ((*trackitr)->HitPattern() & 0x1);
79 int nPixelHits = 2*(*trackitr)->NPixelSpacePoints();
80 int nSctHits = 2*(*trackitr)->NSCT_SpacePoints();
81 int nStrawHits = (*trackitr)->NStrawHits();
82 int nTrHits = (*trackitr)->NTRHits();
85 bool expectBL =
false;
87 unsigned hitPattern = (*trackitr)->HitPattern();
88 unsigned multiPattern = 0;
90 double chi2 = (*trackitr)->chi2();
98 deta, dphi, dz0, dd0, dpT,
100 nStrawHits, nTrHits, hitPattern, multiPattern,
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setPlacement()
|
protectedvirtualinherited |
◆ setPlacementForP()
template<class TRANS , class PERS >
template<class P >
Set POOL placement for type P.
◆ setPlacementWithType()
Placement AthenaPoolConverter::setPlacementWithType |
( |
const std::string & |
tname, |
|
|
const std::string & |
key, |
|
|
const std::string & |
output |
|
) |
| |
|
protectedvirtualinherited |
Set POOL placement hint for a given type.
- Parameters
-
tname | [IN] type name. |
key | [IN] SG key. |
Definition at line 176 of file AthenaPoolConverter.cxx.
179 std::string::size_type pos1 =
output.find(
'[');
180 std::string outputConnectionSpec =
output.substr(0, pos1);
188 std::string containerName;
191 std::size_t colonPos = containerPrefix.find(
':');
192 if (colonPos != std::string::npos) {
193 dhContainerPrefix = containerPrefix.substr(0, colonPos + 1) + dhContainerPrefix;
199 std::string containerFriendPostfix;
200 while (pos1 != std::string::npos) {
201 const std::string::size_type pos2 =
output.find(
'=', pos1);
202 const std::string thisKey =
output.substr(pos1 + 1, pos2 - pos1 - 1);
203 const std::string::size_type pos3 =
output.find(
']', pos2);
204 const std::string
value =
output.substr(pos2 + 1, pos3 - pos2 - 1);
205 if (thisKey ==
"OutputCollection") {
206 dhContainerPrefix =
value;
207 }
else if (thisKey ==
"PoolContainerPrefix") {
208 containerPrefix =
value;
209 }
else if (thisKey ==
"TopLevelContainerName") {
210 containerNameHint =
value;
211 }
else if (thisKey ==
"SubLevelBranchName") {
212 branchNameHint =
value;
213 }
else if (thisKey ==
"PoolContainerFriendPostfix") {
214 containerFriendPostfix =
value;
216 pos1 =
output.find(
'[', pos3);
220 if( tname.compare(0, 10,
"DataHeader") == 0 ) {
221 if( tname.compare(10, 4,
"Form") == 0 ) {
222 containerName = dhContainerPrefix +
"Form" +
"(" + tname +
")";
224 if (
key[
key.size() - 1] ==
'/') {
225 containerName = dhContainerPrefix +
"(" +
key + tname +
")";
227 containerName = dhContainerPrefix +
"(" + tname +
")";
232 else if (tname.compare(0, 13,
"AttributeList") == 0) {
234 if( pool::ROOTRNTUPLE_StorageType.exactMatch(tech) ) {
239 tech = pool::ROOTTREE_StorageType.
type();
245 const std::string typeTok =
"<type>", keyTok =
"<key>";
246 containerName = containerPrefix + containerFriendPostfix + containerNameHint;
247 if (!branchNameHint.empty()) {
248 containerName +=
"(" + branchNameHint +
")";
250 const std::size_t pos1 = containerName.find(typeTok);
251 if (pos1 != std::string::npos) {
252 containerName.replace(pos1, typeTok.size(), tname);
254 const std::size_t pos2 = containerName.find(keyTok);
255 if (pos2 != std::string::npos) {
257 containerName.replace(pos2, keyTok.size(), tname);
259 containerName.replace(pos2, keyTok.size(),
key);
◆ setToken()
template<class TRANS , class PERS >
|
protectedvirtualinherited |
◆ storageType()
long AthenaPoolConverter::storageType |
( |
| ) |
|
|
staticinherited |
◆ tracks()
◆ transToPers()
template<class TRANS , class PERS >
|
inlineoverrideprotectedvirtualinherited |
◆ updateRep()
StatusCode DataHeaderCnv::updateRep |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
overridevirtual |
Extend base-class conversion methods.
Definition at line 117 of file DataHeaderCnv.cxx.
120 ATH_MSG_ERROR(
"updateRep called but the previous DataHeader was not yet processed."
123 return StatusCode::FAILURE;
128 std::size_t tagBeg = pAddress->par()[1].find(
"[KEY=") + 5;
129 std::size_t tagSize = pAddress->par()[1].find(
']', tagBeg) - tagBeg;
131 return StatusCode::SUCCESS;
◆ updateRepRefs()
StatusCode DataHeaderCnv::updateRepRefs |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
overridevirtual |
Definition at line 142 of file DataHeaderCnv.cxx.
144 static const pool::Guid dhf_p6_guid(
"7BE56CEF-C866-4BEE-9348-A5F34B5F1DAD");
145 std::string dhid = pAddress->par()[1];
147 this->
setToken( pAddress->par()[0] );
149 ATH_MSG_ERROR(
"updateRepRefs called without DataHeaderForm" );
150 return StatusCode::FAILURE;
159 ATH_MSG_ERROR(
"updateRepRefs: missing DataHeaderForm for DH ID=" << dhid );
160 return StatusCode::FAILURE;
164 return StatusCode::FAILURE;
173 return(StatusCode::SUCCESS);
◆ wroteNewDHForm()
bool DataHeaderCnv::wroteNewDHForm |
( |
| ) |
|
|
inline |
◆ CnvFactory< DataHeaderCnv >
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_athenaPoolCnvSvc
◆ m_beamX
double Converter::m_beamX |
|
protectedinherited |
◆ m_beamY
double Converter::m_beamY |
|
protectedinherited |
◆ m_beamZ
double Converter::m_beamZ |
|
protectedinherited |
◆ m_branchNameHint
std::string AthenaPoolConverter::m_branchNameHint |
|
protectedinherited |
◆ m_classDesc
RootType AthenaPoolConverter::m_classDesc |
|
protectedinherited |
◆ m_classDescs
ClassMap AthenaPoolConverter::m_classDescs |
|
protectedinherited |
◆ m_classID
template<class TRANS , class PERS >
◆ m_className
std::string AthenaPoolConverter::m_className |
|
protectedinherited |
◆ m_containerNameHint
std::string AthenaPoolConverter::m_containerNameHint |
|
protectedinherited |
◆ m_containerPrefix
std::string AthenaPoolConverter::m_containerPrefix |
|
protectedinherited |
◆ m_conv_mut
◆ m_dataObject
const DataObject* AthenaPoolConverter::m_dataObject |
|
protectedinherited |
◆ m_dhFormMdx
std::string DataHeaderCnv::m_dhFormMdx |
|
protected |
◆ m_dhFormType
◆ m_dhInForm5
◆ m_i_poolToken
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_inDHFMapMaxsize
unsigned DataHeaderCnv::m_inDHFMapMaxsize |
|
protected |
◆ m_inDHFormCount
std::map<std::string, unsigned> DataHeaderCnv::m_inDHFormCount |
|
protected |
How many DHForms for an input file are in the cache.
Definition at line 79 of file DataHeaderCnv.h.
◆ m_inputDHForms
std::map<std::string, std::unique_ptr<DataHeaderForm_p6> > DataHeaderCnv::m_inputDHForms |
|
protected |
◆ m_lastGoodDHFRef
std::map< std::string, std::string> DataHeaderCnv::m_lastGoodDHFRef |
|
protected |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_persFormMap
std::map<std::string, std::unique_ptr<DataHeaderForm_p6> > DataHeaderCnv::m_persFormMap |
|
protected |
DHForm cache indexed by filename or reference for writing.
Definition at line 74 of file DataHeaderCnv.h.
◆ m_persMap
template<class TRANS , class PERS >
◆ m_persObjLists
template<class TRANS , class PERS >
Local cache for persistent objects created by this converter, grouped by processing slot These objects are deleted after a commit.
Definition at line 120 of file T_AthenaPoolCustomCnv.h.
◆ m_pListMutex
template<class TRANS , class PERS >
◆ m_sharedWriterCachedDH
cached values for use with SharedWriter server
Definition at line 93 of file DataHeaderCnv.h.
◆ m_sharedWriterCachedDHForm
std::map< std::string, std::unique_ptr<DataHeaderForm_p6> > DataHeaderCnv::m_sharedWriterCachedDHForm |
|
protected |
◆ m_sharedWriterCachedDHKey
std::string DataHeaderCnv::m_sharedWriterCachedDHKey |
|
protected |
◆ m_sharedWriterCachedDHToken
std::string DataHeaderCnv::m_sharedWriterCachedDHToken |
|
protected |
◆ m_tpInConverter
◆ m_tpInConverter_p5
◆ m_tpOutConverter
◆ m_tracks
◆ m_wroteDHForm
bool DataHeaderCnv::m_wroteDHForm {false} |
|
protected |
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
@ numberOfPixelHits
number of pixel layers on track with absence of hits
virtual Placement setPlacementWithType(const std::string &tname, const std::string &key, const std::string &output)
Set POOL placement hint for a given type.
const DataObject * m_dataObject
void ipCorr(double d0, double z0, double &d0c, double &z0c, double phi0, double eta, double pt)
static const Guid & null()
NULL-Guid: static class method.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Const iterator class for DataVector/DataList.
This class holds all the necessary information to guide the writing of an object in a physical place.
@ numberOfTRTHighThresholdHits
total number of TRT hits which pass the high threshold
virtual StatusCode DataObjectToPool(IOpaqueAddress *pAddr, DataObject *pObj)=0
Write an object into POOL.
Scalar phi() const
phi method
const std::string & contID() const
Access container identifier.
bool nPixelHits(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
static constexpr const char * DataHeader
ServiceHandle< IAthenaPoolCnvSvc > m_athenaPoolCnvSvc
Scalar eta() const
pseudorapidity method
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Scalar theta() const
theta method
const std::string & auxString() const
Access auxiliary string.
const TrackSummary * trackSummary() const
accessor function for TrackSummary.
static long storageType()
const Guid & dbID() const
Access database identifier.
void keepPoolObj(PERS *obj, const std::string &output)
Remember the POOL object to be written out (will be deleted after commit)
static constexpr const char * EventTag
const std::string toString() const
Automatic conversion to string representation.
const Guid & classID() const
Access database identifier.
#define ATH_MSG_VERBOSE(x)
Placement & setAuxString(const std::string &auxString)
Set auxiliary string.
Placement & setContainerName(const std::string &containerName)
Set container name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
int type() const
Access to full type.
@ numberOfBLayerHits
these are the hits in the 0th pixel layer?
virtual void setToken(const std::string &token)
Set the token (in std::string representation) and classID for the object that will be read next.
This class provides a token that identifies in a unique way objects on the persistent storage.
double phiCorr(double phi)
This class provides a Generic Transient Address for POOL tokens.
Token & fromString(const std::string &from)
Build from the string representation of a token.
Token & setClassID(const Guid &cl_id)
Access database identifier.
void setToken(Token *token)
bool nSiHits(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
int technology() const
Access technology type.
const Token * m_i_poolToken
@ numberOfSCTHits
number of SCT holes
Default, invalid implementation of ClassID_traits.
std::string m_containerPrefix
const FitQuality * fitQuality() const
accessor function for FitQuality.
double chi2(TH1 *h0, TH1 *h1)
std::string m_containerNameHint
const std::string & fileName() const
Access file name.
int release()
Release token: Decrease reference count and eventually delete.
Placement & setFileName(const std::string &fileName)
Set file name.
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
uint32_t CLID
The Class ID type.
static constexpr const char * EventTag
MsgStream & msg() const
The standard message stream.
void addTrack(TIDA::Track *t)
static constexpr const char * DataHeader
@ numberOfTRTHits
number of TRT outliers
A summary of the information contained by a track.
virtual StatusCode PoolToDataObject(DataObject *&pObj, const Token *token, const std::string &key)=0
Read an object from POOL.
virtual const std::string toString() const
Retrieve the string representation of the token.
Token & setOid(const OID_t &oid)
Set object identifier.
const std::string toString() const
Retrieve the string representation of the placement.
const Trk::Perigee * measuredPerigee() const
Accessor method for Perigee.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
virtual StatusCode DataObjectToPers(DataObject *pObj, IOpaqueAddress *&pAddr)=0
Convert an object into Persistent.
DetectorType
enumerates the various detector types currently accessible from the isHit() method.
bool exactMatch(const DbType &typ) const
#define ATH_MSG_WARNING(x)
std::string m_branchNameHint
const OID_t & oid() const
Access object identifier.
Token & setAuxString(const std::string &auxString)
Set auxiliary string.
std::string m_nm
Message source name.
Placement & setTechnology(int technology)
Set technology type.
double chiSquared() const
returns the of the overall track fit
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
void initMessaging() const
Initialize our message level and MessageSvc.
const Token & setData(Token *pToken) const
Set all the data part of the token.
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
std::vector< TIDA::Track * > m_tracks
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.