#include <PackedRawDataCnvSvc.h>
Inheritance diagram for PackedRawDataCnvSvc:
Public Member Functions | |
virtual StatusCode | commitOutput (const std::string &t, bool b) |
virtual StatusCode | commitOutput (const std::string &t, bool b) |
virtual StatusCode | connectOutput (const std::string &t, const std::string &) |
virtual StatusCode | connectOutput (const std::string &t) |
virtual StatusCode | connectOutput (const std::string &t, const std::string &) |
virtual StatusCode | connectOutput (const std::string &t) |
virtual StatusCode | createAddress (long storageType, const CLID &clid, const std::string &, IOpaqueAddress *&refpAddress) |
virtual StatusCode | createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) |
virtual StatusCode | createAddress (long storageType, const CLID &clid, const std::string &, IOpaqueAddress *&refpAddress) |
virtual StatusCode | createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) |
virtual StatusCode | declareObject (const Leaf &leaf)=0 |
Declare target leaf. | |
virtual StatusCode | declareObject (const IRawDataCnvSvc::Leaf &leaf) |
Associates a path on TDS with a particular converter. | |
virtual StatusCode | declareObject (const IRawDataCnvSvc::Leaf &leaf) |
Associates a path on TDS with a particular converter. | |
virtual StatusCode | finalize () |
virtual StatusCode | finalize () |
virtual WriteRawEvent *& | getRawEvent () |
virtual WriteRawEvent *& | getRawEvent () |
virtual StatusCode | initialize () |
Initialize the service. | |
virtual StatusCode | initialize () |
Initialize the service. | |
PackedRawDataCnvSvc (const std::string &name, ISvcLocator *svc) | |
Standard Constructor. | |
PackedRawDataCnvSvc (const std::string &name, ISvcLocator *svc) | |
Standard Constructor. | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
Override inherited queryInterface. | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
Override inherited queryInterface. | |
virtual StatusCode | updateServiceState (IOpaqueAddress *pAddress) |
Update state of the service. | |
virtual StatusCode | updateServiceState (IOpaqueAddress *pAddress) |
Update state of the service. | |
virtual | ~PackedRawDataCnvSvc () |
Standard Destructor. | |
virtual | ~PackedRawDataCnvSvc () |
Standard Destructor. | |
Protected Member Functions | |
virtual StatusCode | addConverters () |
Add converters to the service. | |
virtual StatusCode | addConverters () |
Add converters to the service. | |
Private Attributes | |
unsigned int | ef_info [4] |
IRawDataOutputSvc * | m_ioSvc |
IRawDataOutputSvc * | m_ioSvc |
std::string | m_ioSvcName |
WriteRawEvent * | m_rawEvent |
WriteRawEvent * | m_rawEvent |
uint32_t | m_status |
Friends | |
class | CnvFactory<PackedRawDataCnvSvc> |
|
Standard Constructor.
00049 : RawDataCnvSvc(name, svc, PACKEDRAWEVENT_StorageType) 00050 { 00051 declareProperty("RawDataOutputSvc", m_ioSvcName); 00052 declareProperty("Status", m_status=0xFFFFFFFF); //fucd 00053 }
|
|
Standard Destructor.
00057 {}
|
|
Standard Constructor.
|
|
Standard Destructor.
|
|
Add converters to the service.
Implements RawDataCnvSvc. |
|
Add converters to the service.
Implements RawDataCnvSvc. 00087 { 00088 MsgStream log(messageService(), name()); 00089 //log << MSG::INFO << name() << " PackedRawDataCnvSvc::addConverters" << endreq; 00090 declareObject(IRawDataCnvSvc::Leaf(EventModel::EventH, RawDataCnv::classID(), "PASS", 0)); 00091 //log << MSG::INFO << "EventModel::EventH " << RawDataCnv::classID() << endreq; 00092 declareObject(IRawDataCnvSvc::Leaf(EventModel::EventHeader, RawDataEvtHeaderCnv::classID(), "PASS", 0)); 00093 //log << MSG::INFO << "EventModel::EventHeader " << RawDataEvtHeaderCnv::classID() << endreq; 00094 declareObject(IRawDataCnvSvc::Leaf(EventModel::MC::Event, RawDataMcCnv::classID(), "PASS", 0)); 00095 declareObject(IRawDataCnvSvc::Leaf(EventModel::MC::McParticleCol, RawDataMcParticleCnv::classID(), "PASS", 0)); 00096 declareObject(IRawDataCnvSvc::Leaf(EventModel::MC::MdcMcHitCol, RawDataMdcMcHitCnv::classID(), "PASS", 0)); 00097 declareObject(IRawDataCnvSvc::Leaf(EventModel::MC::TofMcHitCol, RawDataTofMcHitCnv::classID(), "PASS", 0)); 00098 declareObject(IRawDataCnvSvc::Leaf(EventModel::MC::EmcMcHitCol, RawDataEmcMcHitCnv::classID(), "PASS", 0)); 00099 declareObject(IRawDataCnvSvc::Leaf(EventModel::MC::MucMcHitCol, RawDataMucMcHitCnv::classID(), "PASS", 0)); 00100 declareObject(IRawDataCnvSvc::Leaf(EventModel::Digi::Event, RawDataDigiCnv::classID(), "PASS", 0)); 00101 declareObject(IRawDataCnvSvc::Leaf(EventModel::Digi::MdcDigiCol, RawDataMdcDigiCnv::classID(), "PASS", 0)); 00102 declareObject(IRawDataCnvSvc::Leaf(EventModel::Digi::TofDigiCol, RawDataTofDigiCnv::classID(), "PASS", 0)); 00103 declareObject(IRawDataCnvSvc::Leaf(EventModel::Digi::LumiDigiCol,RawDataLumiDigiCnv::classID(), "PASS", 0)); 00104 declareObject(IRawDataCnvSvc::Leaf(EventModel::Digi::EmcDigiCol, RawDataEmcDigiCnv::classID(), "PASS", 0)); 00105 declareObject(IRawDataCnvSvc::Leaf(EventModel::Digi::MucDigiCol, RawDataMucDigiCnv::classID(), "PASS", 0)); 00106 declareObject(IRawDataCnvSvc::Leaf(EventModel::Trig::Event, RawDataTrigCnv::classID(), "PASS", 0)); 00107 declareObject(IRawDataCnvSvc::Leaf(EventModel::Trig::TrigGTDCol, RawDataTrigGTDCnv::classID(), "PASS", 0)); 00108 declareObject(IRawDataCnvSvc::Leaf(EventModel::Hlt::Event, RawDataHltCnv::classID(), "PASS", 0)); 00109 declareObject(IRawDataCnvSvc::Leaf(EventModel::Hlt::HltRawCol, RawDataHltRawCnv::classID(), "PASS", 0)); 00110 00111 return StatusCode::SUCCESS; 00112 }
|
|
|
|
00165 { 00166 MsgStream log(messageService(), name() ); 00167 00168 log << MSG::DEBUG << "In flushOutput" << endreq; 00169 00170 if (!m_ioSvc) { 00171 log << MSG::ERROR << "RawDataCnvSvc not configure for output" << endreq; 00172 return StatusCode::FAILURE; 00173 } 00174 00175 /*if (!m_rawEvent->is_valid()) { 00176 log << MSG::ERROR << "commitOutput failed, because FullEventFragment invalid" 00177 << m_rawEvent << endreq; 00178 return StatusCode::FAILURE; 00179 }*/ 00180 00181 log << MSG::DEBUG << "commitOutput: Size of Event (words) =" 00182 << m_rawEvent->size_word() << endreq; 00183 00184 if (!m_ioSvc->putEvent(m_rawEvent) ) { 00185 log << MSG::ERROR << "commitOutput failed to send output" << endreq; 00186 return StatusCode::FAILURE; 00187 } 00188 00189 // delete ... 00190 const eformat::write::SubDetectorFragment* sd = m_rawEvent->first_child(); 00191 while ( sd != 0) { 00192 const eformat::write::ROSFragment* ros = sd->first_child(); 00193 while (ros != 0) { 00194 const eformat::write::ROBFragment* rob = ros->first_child(); 00195 while (rob != 0) { 00196 const eformat::write::ROBFragment* rob_tmp = rob; 00197 rob = rob->next(); 00198 delete rob_tmp; 00199 } 00200 const eformat::write::ROSFragment* ros_tmp = ros; 00201 ros = ros->next(); 00202 delete ros_tmp; 00203 } 00204 const eformat::write::SubDetectorFragment* sd_tmp = sd; 00205 sd = sd->next(); 00206 delete sd_tmp; 00207 } 00208 delete m_rawEvent; 00209 00210 return StatusCode::SUCCESS; 00211 }
|
|
00042 { 00043 return connectOutput(t) ; 00044 }
|
|
|
|
00042 { 00043 return connectOutput(t) ; 00044 }
|
|
00134 { 00135 00136 MsgStream log(messageService(), name() ); 00137 00138 log << MSG::DEBUG << " In connectOutput "<< endreq; 00139 00140 // Get DataObj from TDS 00141 SmartDataPtr<Event::EventHeader> evt(dataProvider(), EventModel::EventHeader); 00142 if (!evt) { 00143 log << MSG::ERROR << "Did not retrieve event" << endreq; 00144 return StatusCode::FAILURE; 00145 } 00146 unsigned int eventNo = evt->eventNumber(); 00147 unsigned int runNo = evt->runNumber(); 00148 00149 m_rawEvent = new WriteRawEvent(0x790000, // source_id 00150 eventNo, // global_id 00151 runNo, // run_no 00152 eventNo, // lel1_id 00153 0, // lel1_type 00154 0, // lel2_info 00155 ef_info // ef_info 00156 ); 00157 //const unsigned int status = 0; // place holder for status 00158 if(m_status!=0xFFFFFFFF) m_rawEvent->status(1, &m_status); 00159 else m_rawEvent->status(0, NULL); //fucd 00160 00161 return StatusCode::SUCCESS; 00162 }
|
|
|
|
|
|
00188 { 00189 return createAddress(storageType, clid, NULL, NULL, refpAddress); 00190 }
|
|
00167 { 00168 MsgStream log( msgSvc(), name() ); 00169 00170 if (storageType != repSvcType() ) { 00171 log << MSG::ERROR << "bad storage type" << storageType << endreq; 00172 return StatusCode::FAILURE; 00173 } 00174 00175 refpAddress = new GenericAddress(storageType, 00176 clid, 00177 "", 00178 "", 00179 0); 00180 00181 return StatusCode::SUCCESS; 00182 }
|
|
Declare target leaf.
|
|
Associates a path on TDS with a particular converter.
|
|
Associates a path on TDS with a particular converter.
00083 { 00084 // Purpose and Method: Callback from each of the individual converters that allows 00085 // association of TDS path and converter. 00086 Leaf* ll = new Leaf(leaf); 00087 std::pair<LeafMap::iterator, bool> p = m_leaves.insert(LeafMap::value_type( leaf.path, ll) ); 00088 if( p.second ) { 00089 return StatusCode::SUCCESS; 00090 } 00091 delete ll; 00092 return StatusCode::FAILURE; 00093 }
|
|
|
|
00074 { 00075 StatusCode status = ConversionSvc::finalize(); 00076 for (LeafMap::iterator k = m_leaves.begin(); k != m_leaves.end(); k++ ) { 00077 delete (*k).second; 00078 } 00079 m_leaves.erase(m_leaves.begin(), m_leaves.end()); 00080 return status; 00081 }
|
|
00050 {
00051 return m_rawEvent;
00052 }
|
|
00050 {
00051 return m_rawEvent;
00052 }
|
|
Initialize the service.
Reimplemented from RawDataCnvSvc. |
|
Initialize the service.
Reimplemented from RawDataCnvSvc. 00060 { 00061 MsgStream log(messageService(), name()); 00062 log << MSG::INFO << name() << " PackedRawDataCnvSvc::initialize RawDataOutputSvc:" << m_ioSvcName<< endreq; 00063 00064 StatusCode sc = RawDataCnvSvc::initialize(); 00065 if( sc.isFailure() ) { 00066 log << MSG::ERROR << "Unable to initialize service " << endreq; 00067 return sc; 00068 } 00069 00070 IService* svc ; 00071 sc = service(m_ioSvcName, svc); 00072 if (sc != StatusCode::SUCCESS ) { 00073 log << MSG::WARNING << "Cant get RawDataOutputSvc " << endreq; 00074 //return sc ; 00075 } 00076 00077 m_ioSvc = dynamic_cast<IRawDataOutputSvc*> (svc); 00078 if (m_ioSvc == 0 ) { 00079 log << MSG::WARNING << "Cant cast to RawDataOutputSvc " << endreq; 00080 //return StatusCode::FAILURE; 00081 } 00082 00083 return StatusCode::SUCCESS; 00084 }
|
|
Override inherited queryInterface.
Reimplemented from RawDataCnvSvc. |
|
Override inherited queryInterface.
Reimplemented from RawDataCnvSvc. 00122 { 00123 if ( IID_IRawDataBaseCnv == riid ) { 00124 *ppvInterface = (IRawDataCnvSvc*)this; 00125 } else { 00126 // Interface is not directly availible: try out a base class 00127 return ConversionSvc::queryInterface(riid, ppvInterface); 00128 } 00129 addRef(); 00130 return StatusCode::SUCCESS; 00131 }
|
|
Update state of the service.
Reimplemented from RawDataCnvSvc. |
|
Update state of the service.
Reimplemented from RawDataCnvSvc. 00115 { 00116 MsgStream log(messageService(), name()); 00117 StatusCode sc = RawDataCnvSvc::updateServiceState(pAddress); 00118 //log << MSG::INFO << "In PackedRawDataCnvSvc::updateServiceState" << endreq; 00119 return sc; 00120 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|