ATLAS Offline Software
Loading...
Searching...
No Matches
LAruA2MeVCompleteCnv Class Referenceabstract

#include <LAruA2MeVCompleteCnv.h>

Inheritance diagram for LAruA2MeVCompleteCnv:
Collaboration diagram for LAruA2MeVCompleteCnv:

Public Member Functions

 LAruA2MeVCompleteCnv (ISvcLocator *svcloc)
virtual StatusCode finalize () override
virtual long repSvcType () const override
const ServiceHandle< StoreGateSvc > & detStore () const
 Handle to DetectorStore.
virtual StatusCode cleanUp (const std::string &output) override
 Implement cleanUp for AthenaPoolConverter to do nothing.
void addTrack (TIDA::Track *t)
const std::vector< TIDA::Track * > & tracks () const
void clear ()
void selectTracks (const TrigInDetTrackCollection *trigtracks)
void selectTracks (const Rec::TrackParticleContainer *trigtracks)
void selectTracks (const Analysis::MuonContainer *muontracks)
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Static Public Member Functions

static const CLIDclassID ()
static long storageType ()

Protected Types

typedef T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1cnvBase
typedef std::map< std::string, RootTypeClassMap
typedef ClassMap::const_iterator ClassMapIt
typedef std::mutex CallMutex

Protected Member Functions

virtual LArConditionsSubset< LArSingleFloatP > * createTransient ()
 Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>
LArConditionsSubset< LArSingleFloatP > * createTransient (LArConditionsSubset< LAruA2MeVP > *orig)
virtual LArSingleFloatSubset_p1createPersistent (LArConditionsSubset< LArSingleFloatP > *transObj)
 method to be implemented by the developer.
virtual ELEM_P * createPersistent (ELEM_T *obj)
 method to be implemented by the developer.
LArConditionsSubset< LArSingleFloatP > * createTransientSingleFloat ()
 returns NULL if object is not a LArConditionsSubset<LArSingleFloatP>
virtual StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj) override
 Create a transient object from a POOL persistent representation.
virtual StatusCode createRep (DataObject *pObj, IOpaqueAddress *&pAddr) override
 Create a POOL persistent representation for a transient object.
virtual StatusCode fillRepRefs (IOpaqueAddress *pAddr, DataObject *pObj) override
 Create a POOL persistent representation for a transient object.
StatusCode objectToAttrListColl ATLAS_NOT_THREAD_SAFE (LAruA2MeVComplete *obj, IOpaqueAddress *&pAddr, CondAttrListCollection *&attrListColl, std::unique_ptr< Token > &token)
 Write out objects stored in "obj" into POOL and save the tokens in a CondAttrListCollection, as well write out "obj" i.e.
StatusCode objectToAttrListColl ATLAS_NOT_THREAD_SAFE (COLL_T *obj, IOpaqueAddress *&pAddr, CondAttrListCollection *&attrListColl, std::unique_ptr< Token > &token)
 Write out objects stored in "obj" into POOL and save the tokens in a CondAttrListCollection, as well write out "obj" i.e.
StatusCode attrListCollToObject (CondAttrListCollection *attrListColl, LAruA2MeVComplete *&obj)
 Read in objects from POOL for the tokens stored CondAttrListCollection and save the objects in the output collection.
StatusCode attrListCollToObject (CondAttrListCollection *attrListColl, COLL_T *&obj)
 Read in objects from POOL for the tokens stored CondAttrListCollection and save the objects in the output collection.
StatusCode condMultChanCollImplToObject (const std::string &collImplToken, LAruA2MeVComplete *&obj)
 Read in CondAttrListCollImpl and the objects for its tokens, saving them in the output collection.
StatusCode condMultChanCollImplToObject (const std::string &collImplToken, COLL_T *&obj)
 Read in CondAttrListCollImpl and the objects for its tokens, saving them in the output collection.
virtual void setToken (const std::string &token) override final
 specialized version that adds persistency contextID to tokens (for reading)
PpoolReadObject ()
 Read object of type P.
LArConditionsSubset< LArSingleFloatP > * poolReadObject ()
virtual StatusCode transToPers (LAruA2MeVComplete *obj, LArConditionsSubset< LArSingleFloatP > *&persObj) override
 Dummy methods not needed here.
virtual StatusCode transToPers (TRANS *obj, PERS *&persObj)=0
virtual StatusCode transToPers (COLL_T *obj, ELEM_T *&persObj) override
 Dummy methods not needed here.
virtual StatusCode persToTrans (LAruA2MeVComplete *&transObj, LArConditionsSubset< LArSingleFloatP > *obj) override
virtual StatusCode persToTrans (TRANS *&transObj, PERS *obj)=0
virtual StatusCode persToTrans (COLL_T *&transObj, ELEM_T *obj) override
virtual StatusCode initialize ()
 Gaudi Service Interface method implementations:
Placement setPlacementForP (P &p, const std::string &key, const std::string &output)
 Set POOL placement for type P.
virtual StatusCode DataObjectToPers (DataObject *pObj, IOpaqueAddress *&pAddr)
 Convert an object into Persistent.
virtual StatusCode DataObjectToPool (IOpaqueAddress *pAddr, DataObject *pObj)
 Write an object into POOL.
virtual StatusCode PoolToDataObject (DataObject *&pObj, const Token *token, const std::string &key)
 Read an object from POOL.
StatusCode objectToPool (P *pObj, std::unique_ptr< Token > &token, const std::string &key, const std::string &output)
 Write an object into POOL returning its token.
StatusCode poolToObject (const Token *&token, P *&pObj)
 Read an object from POOL.
virtual bool compareClassGuid (const Guid &clid) const
 Compare POOL class GUID with the one of the object being read.
virtual Placement setPlacement (const std::string &key, const std::string &output)
 Set POOL placement.
virtual Placement setPlacementWithType (const std::string &tname, const std::string &key, const std::string &output)
 Set POOL placement hint for a given type.
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)

Protected Attributes

int m_persCtx
 Persistency context in which to read all objects (extracted from the Collection Address)
Guid m_classID
ServiceHandle< StoreGateSvcm_detStore
ServiceHandle< IAthenaPoolCnvSvcm_athenaPoolCnvSvc
RootType m_classDesc
std::string m_className
ClassMap m_classDescs
std::string m_containerPrefix
std::string m_containerNameHint
std::string m_branchNameHint
const DataObject * m_dataObject
const Tokenm_i_poolToken
CallMutex m_conv_mut
double m_beamX
double m_beamY
double m_beamZ
std::vector< TIDA::Track * > m_tracks

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

LArSingleFloatSubsetCnv_p1 m_TPconverter
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE
 Messaging initialized (initMessaging)

Friends

class CnvFactory< LAruA2MeVCompleteCnv >

Detailed Description

Definition at line 22 of file LAruA2MeVCompleteCnv.h.

Member Typedef Documentation

◆ CallMutex

typedef std::mutex AthenaPoolConverter::CallMutex
protectedinherited

Definition at line 132 of file AthenaPoolConverter.h.

◆ ClassMap

typedef std::map<std::string, RootType> AthenaPoolConverter::ClassMap
protectedinherited

Definition at line 120 of file AthenaPoolConverter.h.

◆ ClassMapIt

typedef ClassMap::const_iterator AthenaPoolConverter::ClassMapIt
protectedinherited

Definition at line 121 of file AthenaPoolConverter.h.

◆ cnvBase

Constructor & Destructor Documentation

◆ LAruA2MeVCompleteCnv()

LAruA2MeVCompleteCnv::LAruA2MeVCompleteCnv ( ISvcLocator * svcloc)
inline

Definition at line 26 of file LAruA2MeVCompleteCnv.h.

26: LAruA2MeVCompleteCnvBase(svcloc) {}
LArSingleFloatConverter< LAruA2MeVComplete > LAruA2MeVCompleteCnvBase

Member Function Documentation

◆ addTrack()

void Converter::addTrack ( TIDA::Track * t)
inlineinherited

Definition at line 45 of file Converter.h.

45 {
46 m_tracks.push_back(t);
47 }
std::vector< TIDA::Track * > m_tracks
Definition Converter.h:321

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

StatusCode objectToAttrListColl T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::ATLAS_NOT_THREAD_SAFE ( LAruA2MeVComplete * obj,
IOpaqueAddress *& pAddr,
CondAttrListCollection *& attrListColl,
std::unique_ptr< Token > & token )
protectedinherited

Write out objects stored in "obj" into POOL and save the tokens in a CondAttrListCollection, as well write out "obj" i.e.

CondMultChanCollImpl

Parameters
obj[IN] pointer to the collection of objects.
attrListColl[OUT] CondAttrListCollection filled with tokens
token[OUT] Token from writing out CondMultChanCollImpl

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

template<class COLL_T, class ELEM_T, class ELEM_P = ELEM_T>
StatusCode objectToAttrListColl T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >::ATLAS_NOT_THREAD_SAFE ( COLL_T * obj,
IOpaqueAddress *& pAddr,
CondAttrListCollection *& attrListColl,
std::unique_ptr< Token > & token )
protectedinherited

Write out objects stored in "obj" into POOL and save the tokens in a CondAttrListCollection, as well write out "obj" i.e.

CondMultChanCollImpl

Parameters
obj[IN] pointer to the collection of objects.
attrListColl[OUT] CondAttrListCollection filled with tokens
token[OUT] Token from writing out CondMultChanCollImpl

◆ attrListCollToObject() [1/2]

StatusCode T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::attrListCollToObject ( CondAttrListCollection * attrListColl,
LAruA2MeVComplete *& obj )
protectedinherited

Read in objects from POOL for the tokens stored CondAttrListCollection and save the objects in the output collection.

Parameters
attrListColl[IN] CondAttrListCollection filled with tokens
obj[OUT] pointer to the collection of objects.

◆ attrListCollToObject() [2/2]

template<class COLL_T, class ELEM_T, class ELEM_P = ELEM_T>
StatusCode T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >::attrListCollToObject ( CondAttrListCollection * attrListColl,
COLL_T *& obj )
protectedinherited

Read in objects from POOL for the tokens stored CondAttrListCollection and save the objects in the output collection.

Parameters
attrListColl[IN] CondAttrListCollection filled with tokens
obj[OUT] pointer to the collection of objects.

◆ classID()

const CLID & T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::classID ( )
staticinherited
Returns
class ID.

◆ cleanUp()

StatusCode AthenaPoolConverter::cleanUp ( const std::string & output)
overridevirtualinherited

Implement cleanUp for AthenaPoolConverter to do nothing.

Definition at line 78 of file AthenaPoolConverter.cxx.

280 {
281 ATH_MSG_DEBUG("AthenaPoolConverter cleanUp called for base class.");
282 return StatusCode::SUCCESS;
283}
#define ATH_MSG_DEBUG(x)

◆ clear()

void Converter::clear ( )
inlineinherited

Definition at line 53 of file Converter.h.

53{m_tracks.clear();}

◆ compareClassGuid()

virtual bool T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::compareClassGuid ( const Guid & clid) const
protectedvirtualinherited

Compare POOL class GUID with the one of the object being read.

Parameters
clid[IN] GUID to compare
Returns
true if the type of the object about to be read matches the GUID

◆ condMultChanCollImplToObject() [1/2]

StatusCode T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::condMultChanCollImplToObject ( const std::string & collImplToken,
LAruA2MeVComplete *& obj )
protectedinherited

Read in CondAttrListCollImpl and the objects for its tokens, saving them in the output collection.

Parameters
collImplToken[IN] CondAttrListCollImpl token
obj[OUT] pointer to the collection of objects.

◆ condMultChanCollImplToObject() [2/2]

template<class COLL_T, class ELEM_T, class ELEM_P = ELEM_T>
StatusCode T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >::condMultChanCollImplToObject ( const std::string & collImplToken,
COLL_T *& obj )
protectedinherited

Read in CondAttrListCollImpl and the objects for its tokens, saving them in the output collection.

Parameters
collImplToken[IN] CondAttrListCollImpl token
obj[OUT] pointer to the collection of objects.

◆ createObj()

virtual StatusCode T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::createObj ( IOpaqueAddress * pAddr,
DataObject *& pObj )
overrideprotectedvirtualinherited

Create a transient object from a POOL persistent representation.

Parameters
pAddr[IN] IOpaqueAddress of POOL persistent representation.
pObj[OUT] pointer to the transient object.

◆ createPersistent() [1/2]

virtual LArSingleFloatSubset_p1 * LArSingleFloatConverter< LAruA2MeVComplete >::createPersistent ( LArConditionsSubset< LArSingleFloatP > * transObj)
protectedvirtualinherited

method to be implemented by the developer.

It should create the persistent representation of the object, using the default top-level TP converter.

Parameters
obj[IN] transient object
Returns
the created persistent representation (by pointer)

◆ createPersistent() [2/2]

template<class COLL_T, class ELEM_T, class ELEM_P = ELEM_T>
virtual ELEM_P * T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >::createPersistent ( ELEM_T * obj)
protectedvirtualinherited

method to be implemented by the developer.

It should create the persistent representation of the object, using the default top-level TP converter.

Parameters
obj[IN] transient object
Returns
the created persistent representation (by pointer)

Reimplemented in AlignableTransformContainerCnv, LArAutoCorrCompleteCnv, LArAutoCorrMCCnv, LArCaliWaveContainerCnv, LArDSPThresholdsCompleteCnv, LArOFCBinCompleteCnv, LArOFCCompleteCnv, LArPedestalCompleteCnv, LArPhysWaveContainerCnv, LArRampCompleteCnv, LArRampMCCnv, LArShape32MCCnv, LArShapeCompleteCnv, LArSingleFloatConverter< TransientClass >, and LArSingleFloatConverter< LArHVScaleCorrComplete >.

◆ createRep()

virtual StatusCode T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::createRep ( DataObject * pObj,
IOpaqueAddress *& pAddr )
overrideprotectedvirtualinherited

Create a POOL persistent representation for a transient object.

Parameters
pObj[IN] pointer to the transient object.
pAddr[OUT] IOpaqueAddress of POOL persistent representation.

◆ createTransient() [1/2]

LArConditionsSubset< LArSingleFloatP > * LAruA2MeVCompleteCnv::createTransient ( )
protectedvirtual

Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>

Reimplemented from LArSingleFloatConverter< LAruA2MeVComplete >.

Definition at line 15 of file LAruA2MeVCompleteCnv.cxx.

16{
17 static const pool::Guid p0_guid("CBF815A2-F18C-4C18-9E93-A8EE67CEE59F");
18 // first try the single-float converter
19 LArConditionsSubset<LArSingleFloatP>* p=createTransientSingleFloat();
20 if (p)
21 return p;
22 else if( compareClassGuid(p0_guid) ) {
23 // subset from before TP separation
24 MsgStream log(msgSvc(), "LAruA2MeVCompleteCnv" );
25 log << MSG::DEBUG << "Reading LAruA2MeVSubset (original)" << endmsg;
26 std::unique_ptr< LArConditionsSubset<LAruA2MeVP> > subset ( poolReadObject< LArConditionsSubset<LAruA2MeVP> >() );
27 return (createTransient(subset.get()));
28
29 }
30 throw std::runtime_error("Unsupported persistent version of LAruA2MeVComplete");
31}
#define endmsg
LArConditionsSubset< LArSingleFloatP > * createTransientSingleFloat()
virtual LArConditionsSubset< LArSingleFloatP > * createTransient()
Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>
P * poolReadObject()
Read object of type P.
virtual bool compareClassGuid(const Guid &clid) const
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ createTransient() [2/2]

LArConditionsSubset< LArSingleFloatP > * LAruA2MeVCompleteCnv::createTransient ( LArConditionsSubset< LAruA2MeVP > * orig)
protected

Definition at line 34 of file LAruA2MeVCompleteCnv.cxx.

35{
36 MsgStream log(msgSvc(), "LAruA2MeVCompleteCnv" );
37 log << MSG::DEBUG << "LAruA2MeVCompleteCnv::createTransient orig " << orig << endmsg;
38
39 LArConditionsSubset<LArSingleFloatP>* result = new LArConditionsSubset<LArSingleFloatP>();
40
41 // Copy LAruA2MeVP subset to LArSingleFloat Subset
42 LArSingleFloatUpdater copier;
43 copier.update(orig, result);
44
45 return (result);
46}
void update(const LArConditionsSubset< P > *old, LArConditionsSubset< LArSingleFloatP > *newObj)

◆ createTransientSingleFloat()

LArConditionsSubset< LArSingleFloatP > * LArSingleFloatConverter< LAruA2MeVComplete >::createTransientSingleFloat ( )
protectedinherited

returns NULL if object is not a LArConditionsSubset<LArSingleFloatP>

◆ DataObjectToPers()

virtual StatusCode T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::DataObjectToPers ( DataObject * pObj,
IOpaqueAddress *& pAddr )
protectedvirtualinherited

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

◆ DataObjectToPool()

virtual StatusCode T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::DataObjectToPool ( IOpaqueAddress * pAddr,
DataObject * pObj )
protectedvirtualinherited

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

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthenaPoolConverter::detStore ( ) const
inlineinherited

Handle to DetectorStore.

Definition at line 69 of file AthenaPoolConverter.h.

69{ return m_detStore; }

◆ fillRepRefs()

virtual StatusCode T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::fillRepRefs ( IOpaqueAddress * pAddr,
DataObject * pObj )
overrideprotectedvirtualinherited

Create a POOL persistent representation for a transient object.

Parameters
pAddr[IN] IOpaqueAddress of POOL persistent representation.
pObj[IN] pointer to the transient object.

◆ finalize()

StatusCode AthenaPoolConverter::finalize ( )
overridevirtualinherited

Definition at line 49 of file AthenaPoolConverter.cxx.

50 {
51 // Release AthenaPoolCnvSvc
52 if (!m_athenaPoolCnvSvc.release().isSuccess()) {
53 ATH_MSG_WARNING("Cannot release AthenaPoolCnvSvc.");
54 }
55 return(::Converter::finalize());
56}
#define ATH_MSG_WARNING(x)
ServiceHandle< IAthenaPoolCnvSvc > m_athenaPoolCnvSvc

◆ getDataObject()

const DataObject * AthenaPoolConverter::getDataObject ( ) const
protectedvirtualinherited
Returns
data object from the converter.

Definition at line 111 of file AthenaPoolConverter.cxx.

272 {
273 return(m_dataObject);
274}

◆ initialize()

virtual StatusCode T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::initialize ( void )
protectedvirtualinherited

Gaudi Service Interface method implementations:

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 121 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
IMessageSvc * getMessageSvc(bool quiet=false)

◆ 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.

257 {
258
259 double sn = sin(phi0);
260 double cs = cos(phi0);
261 double sd0 = (d0 != 0 ? d0/fabs(d0) : 1);
262 double spt = (pt != 0 ? pt/fabs(pt) : 1);
263
264 if (fabs(pt) >= 1*CLHEP::TeV) {
265
266 d0c = d0 + m_beamX*sn - m_beamY*cs;
267
268 } else {
269
270 double rc = fabs(pt)*15.0/(9.0*1.042);
271
272 double xc = (fabs(d0)-spt*sd0*rc)*cos(phi0+M_PI/2*sd0) - m_beamX;
273 double yc = (fabs(d0)-spt*sd0*rc)*sin(phi0+M_PI/2*sd0) - m_beamY;
274
275 double newphi;
276 double xd01,yd01,xd02,yd02;
277
278 if (xc == 0) {
279 xd01 = 0; yd01 = rc+yc;
280 xd02 = 0; yd02 = -rc+yc;
281 } else {
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;
284 }
285
286 double r1 = sqrt(xd01*xd01+yd01*yd01);
287 double r2 = sqrt(xd02*xd02+yd02*yd02);
288
289 double phiV;
290
291 if (r1 < r2)
292 phiV = atan2(yd01,xd01);
293 else
294 phiV = atan2(yd02,xd02);
295
296 double phi1 = phiCorr(phiV+M_PI/2);
297 double phi2 = phiCorr(phiV-M_PI/2);
298
300 newphi = phi1;
301 else
302 newphi = phi2;
303
305
306 double theta=2*atan2(exp(-eta),1);
307 double theta_save=theta;
308 theta = theta - (1+spt)/2*M_PI;
309 if (theta>0) theta = theta_save;
310
312 z0c = z0 + deltaz0;
313
314 }
315 }
constexpr int pow(int base, int exp) noexcept

◆ 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 92 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls

◆ 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 99 of file AthMessaging.h.

179{ return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 86 of file AthMessaging.h.

152{
153 if (m_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ objectToPool()

StatusCode T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::objectToPool ( P * pObj,
std::unique_ptr< Token > & token,
const std::string & key,
const std::string & output )
protectedinherited

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() [1/3]

virtual StatusCode T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::persToTrans ( LAruA2MeVComplete *& transObj,
LArConditionsSubset< LArSingleFloatP > * obj )
overrideprotectedvirtualinherited

◆ persToTrans() [2/3]

virtual StatusCode T_AthenaPoolCustCnv< TRANS, PERS >::persToTrans ( TRANS *& transObj,
PERS * obj )
protectedpure virtualinherited

◆ persToTrans() [3/3]

template<class COLL_T, class ELEM_T, class ELEM_P = ELEM_T>
virtual StatusCode T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >::persToTrans ( COLL_T *& transObj,
ELEM_T * obj )
overrideprotectedvirtualinherited

◆ phiCorr()

double Converter::phiCorr ( double phi)
inlineprotectedinherited

Definition at line 248 of file Converter.h.

248 {
249
250 if (phi < -TMath::Pi()) phi += 2*TMath::Pi();
251 if (phi > TMath::Pi()) phi -= 2*TMath::Pi();
252
253 return phi;
254 }

◆ poolReadObject() [1/2]

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]

◆ PoolToDataObject()

virtual StatusCode T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::PoolToDataObject ( DataObject *& pObj,
const Token * token,
const std::string & key )
protectedvirtualinherited

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.

◆ poolToObject()

StatusCode T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::poolToObject ( const Token *& token,
P *& pObj )
protectedinherited

Read an object from POOL.

Parameters
token[IN] POOL token of the persistent representation.
pObj[OUT] pointer to the object read.

◆ repSvcType()

long AthenaPoolConverter::repSvcType ( ) const
overridevirtualinherited

Definition at line 51 of file AthenaPoolConverter.cxx.

58 {
59 return pool::POOL_StorageType.type();
60}

◆ selectTracks() [1/3]

void Converter::selectTracks ( const Analysis::MuonContainer * muontracks)
inlineinherited

Definition at line 177 of file Converter.h.

177 {
178
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 };
180
183
184 while(muonitr!=muonend) {
185
186 bool hasInDet = (*muonitr)->hasInDetTrackParticle();
188 if(hasInDet) trackitr=(*muonitr)->inDetTrackParticle();
189 muonitr++;
190 if(!hasInDet) continue;
191
192 const Trk::MeasuredPerigee* measPer = trackitr->measuredPerigee();
193
194 CLHEP::HepVector perigeeParams = measPer->parameters();
195 double pT = measPer->pT();
196 double eta = measPer->eta();
197 double phi = perigeeParams[Trk::phi0];
198 double z0 = perigeeParams[Trk::z0];
199 double d0 = perigeeParams[Trk::d0];
200 //double theta = perigeeParams[Trk::theta];
201
202 double deta = 1;
203 double dphi = 1;
204 double dz0 = 1;
205 double dd0 = 1;
206 double dpT = 1;
207
208 // Check number of hits
209 // NB: a spacepoint is two offline "hits", so a pixel spacepoint is really
210 // 2 "hits" and an offline SCT "hit" is really a 1D cluster, so two intersetcting
211 // stereo clusters making a spacepoint are two "hits"
212 const Trk::TrackSummary *summary = trackitr->trackSummary();
218
220
221 const Trk::FitQuality *quality = trackitr->fitQuality();
222 double chi2 = quality->chiSquared();
223 double dof = quality->quality->numberDoF();
224
225 unsigned bitmap = 0;
226
227 for ( int ih=0 ; ih<20 ; ih++ ) {
228 if ( summary->isHit(Trk::DetectorType(ih)) ) bitmap |= ( 1<<hpmap[ih] );
229 }
230
231 // Shift d0 and z0 according to beam position
232 ipCorr(d0, z0, d0, z0, phi, eta, pT);
233
234 // Create and save Track
235 TIDA::Track* t = new TIDA::Track(eta, phi, z0, d0, pT, chi2, dof,
236 deta, dphi, dz0, dd0, dpT,
239 -1) ;
240
241 addTrack(t);
242 }
243
244 }
void ipCorr(double d0, double z0, double &d0c, double &z0c, double phi0, double eta, double pt)
Definition Converter.h:257

◆ selectTracks() [2/3]

void Converter::selectTracks ( const Rec::TrackParticleContainer * trigtracks)
inlineinherited

Definition at line 111 of file Converter.h.

111 {
112
115
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 };
117
118 while ( trackitr!=trackend ) {
119
120 const Trk::MeasuredPerigee* measPer = (*trackitr)->measuredPerigee();
121
122 CLHEP::HepVector perigeeParams = measPer->parameters();
123 double pT = measPer->pT();
124 double eta = measPer->eta();
125 double phi = perigeeParams[Trk::phi0];
126 double z0 = perigeeParams[Trk::z0];
127 double d0 = perigeeParams[Trk::d0];
128 //double theta = perigeeParams[Trk::theta];
129
130 double deta = 1;
131 double dphi = 1;
132 double dz0 = 1;
133 double dd0 = 1;
134 double dpT = 1;
135
136 // Check number of hits
137 // NB: a spacepoint is two offline "hits", so a pixel spacepoint is really
138 // 2 "hits" and an offline SCT "hit" is really a 1D cluster, so two intersetcting
139 // stereo clusters making a spacepoint are two "hits"
140 const Trk::TrackSummary *summary = (*trackitr)->trackSummary();
147 bool expectBL = false; // Not stored for Rec::TrackParticle
148
149 const Trk::FitQuality *quality = (*trackitr)->fitQuality();
150 double chi2 = quality->chiSquared();
151 double dof = quality->numberDoF();
152
153 unsigned bitmap = 0;
154
155 for ( int ih=0 ; ih<20 ; ih++ ) {
156 if ( summary->isHit(Trk::DetectorType(ih)) ) bitmap |= ( 1<<hpmap[ih] );
157 }
158
159 // Shift d0 and z0 according to beam position
160 ipCorr(d0, z0, d0, z0, phi, eta, pT);
161
162 // Create and save Track
163 TIDA::Track* t = new TIDA::Track(eta, phi, z0, d0, pT, chi2, dof,
164 deta, dphi, dz0, dd0, dpT,
167 -1,
168 expectBL) ;
169
170 addTrack(t);
171 trackitr++;
172 }
173
174 }

◆ selectTracks() [3/3]

void Converter::selectTracks ( const TrigInDetTrackCollection * trigtracks)
inlineinherited

Definition at line 56 of file Converter.h.

56 {
57
60
61 while ( trackitr!=trackend ) {
62
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();
68 //double theta = 2*atan2(exp(-(*trackitr)->param()->eta()),1);
69
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();
75
76 int algoid = (*trackitr)->algorithmId();
77
78 int nBlayerHits = ((*trackitr)->HitPattern() & 0x1);
79 int nPixelHits = 2*(*trackitr)->NPixelSpacePoints(); // NB: for comparison with offline
80 int nSctHits = 2*(*trackitr)->NSCT_SpacePoints(); // a spacepoint is 2 "hits"
81 int nStrawHits = (*trackitr)->NStrawHits();
82 int nTrHits = (*trackitr)->NTRHits();
83
85 bool expectBL = false; //not available with TrigInDetTrack
86
87 unsigned hitPattern = (*trackitr)->HitPattern();
88 unsigned multiPattern = 0;
89
90 double chi2 = (*trackitr)->chi2();
91 double dof = 0;
92
93 // Shift d0 and z0 according to beam position
94 ipCorr(d0, z0, d0, z0, phi, eta, pT);
95
96 // Create and save Track
97 TIDA::Track* t = new TIDA::Track(eta, phi, z0, d0, pT, chi2, dof,
98 deta, dphi, dz0, dd0, dpT,
101 algoid,
102 expectBL ) ;
103
104 addTrack(t);
105 trackitr++;
106 }
107 }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 108 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ setPlacement()

virtual Placement T_AthenaPoolCnvBase< LAruA2MeVComplete >::setPlacement ( const std::string & key,
const std::string & output )
protectedvirtualinherited

Set POOL placement.

◆ setPlacementForP()

Placement T_AthenaPoolCustCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP > >::setPlacementForP ( P & p,
const std::string & key,
const std::string & output )
protectedinherited

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 106 of file AthenaPoolConverter.cxx.

176 {
178 // Override streaming parameters from StreamTool if requested.
181 int tech = 0;
182 m_athenaPoolCnvSvc->decodeOutputSpec(outputConnectionSpec, tech).ignore();
183 // Set DB and Container names
184 placement.setFileName(outputConnectionSpec);
185
187 if( containerPrefix == "Default" ) {
189 }
192
193 // Get Technology from containerPrefix
197 }
198
199 // Override streaming parameters from StreamTool if requested.
203 while (pos1 != std::string::npos) {
204 const std::string::size_type pos2 = output.find('=', pos1);
205 const std::string thisKey = output.substr(pos1 + 1, pos2 - pos1 - 1);
206 const std::string::size_type pos3 = output.find(']', pos2);
207 const std::string value = output.substr(pos2 + 1, pos3 - pos2 - 1);
208 if (thisKey == "OutputCollection") {
210 } else if (thisKey == "PoolContainerPrefix") {
212 } else if (thisKey == "TopLevelContainerName") {
214 } else if (thisKey == "SubLevelBranchName") {
216 } else if (thisKey == "PoolContainerFriendPostfix") {
218 }
219 pos1 = output.find('[', pos3);
220 }
221
222 // --- Special types: DataHeader & Form
223 if( tname.compare(0, 10, "DataHeader") == 0 ) {
224 if( tname.compare(10, 4, "Form") == 0 ) {
225 containerName = dhContainerPrefix + "Form" + "(" + tname + ")";
226 } else {
227 if (key[key.size() - 1] == '/') {
228 containerName = dhContainerPrefix + "(" + key + tname + ")";
229 } else {
230 containerName = dhContainerPrefix + "(" + tname + ")";
231 }
232 }
233 }
234 // AttributeList - writing attributes separately to EventTag container group
235 else if (tname.compare(0, 13, "AttributeList") == 0) {
236 // Find the right storage type and name for EventTag values
239 } else {
240 // no indexing needed (nothing points to Tags)
241 // safe to set tech here - it will not be overwritten by decodeOutput
244 }
245 }
246 // all other object types
247 else {
248 const std::string typeTok = "<type>", keyTok = "<key>";
250 if (!branchNameHint.empty()) {
251 containerName += "(" + branchNameHint + ")";
252 }
254 if (pos1 != std::string::npos) {
255 containerName.replace(pos1, typeTok.size(), tname);
256 }
257 const std::size_t pos2 = containerName.find(keyTok);
258 if (pos2 != std::string::npos) {
259 if (key.empty()) {
260 containerName.replace(pos2, keyTok.size(), tname);
261 } else {
262 containerName.replace(pos2, keyTok.size(), key);
263 }
264 }
265 }
266 m_athenaPoolCnvSvc->decodeOutputSpec(containerName, tech).ignore();
267 placement.setContainerName(containerName);
268 placement.setTechnology(tech);
269 return(placement);
270}

◆ setToken()

virtual void T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::setToken ( const std::string & token)
finaloverrideprotectedvirtualinherited

specialized version that adds persistency contextID to tokens (for reading)

◆ storageType()

long AthenaPoolConverter::storageType ( )
staticinherited
Returns
storage type.

Definition at line 72 of file AthenaPoolConverter.cxx.

155 {
156 return pool::POOL_StorageType.type();
157}

◆ tracks()

const std::vector< TIDA::Track * > & Converter::tracks ( ) const
inlineinherited

Definition at line 50 of file Converter.h.

50{return m_tracks;}

◆ transToPers() [1/3]

virtual StatusCode T_AthenaPoolCoolMultChanCnv< LAruA2MeVComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 >::transToPers ( LAruA2MeVComplete * obj,
LArConditionsSubset< LArSingleFloatP > *& persObj )
overrideprotectedvirtualinherited

Dummy methods not needed here.

◆ transToPers() [2/3]

virtual StatusCode T_AthenaPoolCustCnv< TRANS, PERS >::transToPers ( TRANS * obj,
PERS *& persObj )
protectedpure virtualinherited

◆ transToPers() [3/3]

template<class COLL_T, class ELEM_T, class ELEM_P = ELEM_T>
virtual StatusCode T_AthenaPoolCoolMultChanCnv< COLL_T, ELEM_T, ELEM_P >::transToPers ( COLL_T * obj,
ELEM_T *& persObj )
overrideprotectedvirtualinherited

Dummy methods not needed here.

Implements T_AthenaPoolCustCnv< COLL_T, ELEM_T >.

◆ CnvFactory< LAruA2MeVCompleteCnv >

friend class CnvFactory< LAruA2MeVCompleteCnv >
friend

Definition at line 20 of file LAruA2MeVCompleteCnv.h.

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_athenaPoolCnvSvc

ServiceHandle<IAthenaPoolCnvSvc> AthenaPoolConverter::m_athenaPoolCnvSvc
protectedinherited

Definition at line 117 of file AthenaPoolConverter.h.

◆ m_beamX

double Converter::m_beamX
protectedinherited

Definition at line 320 of file Converter.h.

◆ m_beamY

double Converter::m_beamY
protectedinherited

Definition at line 320 of file Converter.h.

◆ m_beamZ

double Converter::m_beamZ
protectedinherited

Definition at line 320 of file Converter.h.

◆ m_branchNameHint

std::string AthenaPoolConverter::m_branchNameHint
protectedinherited

Definition at line 127 of file AthenaPoolConverter.h.

◆ m_classDesc

RootType AthenaPoolConverter::m_classDesc
protectedinherited

Definition at line 118 of file AthenaPoolConverter.h.

◆ m_classDescs

ClassMap AthenaPoolConverter::m_classDescs
protectedinherited

Definition at line 123 of file AthenaPoolConverter.h.

◆ m_classID

Definition at line 96 of file T_AthenaPoolCustCnv.h.

◆ m_className

std::string AthenaPoolConverter::m_className
protectedinherited

Definition at line 122 of file AthenaPoolConverter.h.

◆ m_containerNameHint

std::string AthenaPoolConverter::m_containerNameHint
protectedinherited

Definition at line 126 of file AthenaPoolConverter.h.

◆ m_containerPrefix

std::string AthenaPoolConverter::m_containerPrefix
protectedinherited

Definition at line 125 of file AthenaPoolConverter.h.

◆ m_conv_mut

CallMutex AthenaPoolConverter::m_conv_mut
protectedinherited

Definition at line 133 of file AthenaPoolConverter.h.

◆ m_dataObject

const DataObject* AthenaPoolConverter::m_dataObject
protectedinherited

Definition at line 129 of file AthenaPoolConverter.h.

◆ m_detStore

ServiceHandle<StoreGateSvc> AthenaPoolConverter::m_detStore
protectedinherited

Definition at line 116 of file AthenaPoolConverter.h.

◆ m_i_poolToken

const Token* AthenaPoolConverter::m_i_poolToken
protectedinherited

Definition at line 130 of file AthenaPoolConverter.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ 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

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_persCtx

Persistency context in which to read all objects (extracted from the Collection Address)

Definition at line 126 of file T_AthenaPoolCoolMultChanCnv.h.

126{ 0 };

◆ m_TPconverter

Definition at line 41 of file LArSingleFloatConverter.h.

◆ m_tracks

std::vector<TIDA::Track*> Converter::m_tracks
protectedinherited

Definition at line 321 of file Converter.h.


The documentation for this class was generated from the following files: