31 MsgStream log(msgSvc(),name());
33 log << MSG::DEBUG <<
"EntryTag: "<< entryTag <<
endmsg;
36 const EventContext& ctx = Gaudi::Hive::currentContext();
37 unsigned int theRun = ctx.eventID().run_number();
38 unsigned int theEvent = ctx.eventID().event_number();
39 unsigned int theType = 0;
46 std::vector<std::string> theEventElements;
47 theEventElements.push_back(
"EventHeader");
48 theEventElements.push_back(
"(CaloCellContainer*)?");
49 theEventElements.push_back(
"(BeamWireChambers*)?");
50 theEventElements.push_back(
"(BeamProfileChambers*)?");
51 theEventElements.push_back(
"(BeamScintillators*)?");
52 theEventElements.push_back(
"(TailCatcher*)?");
53 theEventElements.push_back(
"(PatternUnit*)?");
55 std::vector<std::string> theEventAttr;
56 theEventAttr.push_back(
"name CDATA #REQUIRED");
60 std::vector<std::string> theHeaderElements;
64 std::vector<std::string> theHeaderAttr;
65 theHeaderAttr.push_back(
"name CDATA #REQUIRED");
66 theHeaderAttr.push_back(
"run CDATA #REQUIRED");
67 theHeaderAttr.push_back(
"event CDATA #REQUIRED");
68 theHeaderAttr.push_back(
"type CDATA #REQUIRED");
78 std::vector<std::string> anyData;
79 anyData.push_back(
"ANY");
81 std::vector<std::string> theCaloAttr;
82 theCaloAttr.push_back(
"name CDATA #REQUIRED");
83 theCaloAttr.push_back(
"ncols CDATA #REQUIRED");
84 theCaloAttr.push_back(
"nrows CDATA #REQUIRED");
85 theCaloAttr.push_back(
"idtype ( uint | int | short | ushort ) #REQUIRED");
86 theCaloAttr.push_back(
"etype ( float | double ) #REQUIRED");
87 this->
addAttributes(outStream,
"CaloCellContainer",theCaloAttr);
91 std::vector<std::string> theBPCAttr;
92 theBPCAttr.push_back(
"name CDATA #REQUIRED");
93 theBPCAttr.push_back(
"cols CDATA #REQUIRED");
94 theBPCAttr.push_back(
"idtype ( uint | int | short | ushort ) #REQUIRED");
95 theBPCAttr.push_back(
"xtype ( float | double ) #REQUIRED");
96 theBPCAttr.push_back(
"ytype ( float | double ) #REQUIRED");
100 std::vector<std::string> theMWPCAttr;
101 theMWPCAttr.push_back(
"name CDATA #REQUIRED");
102 theMWPCAttr.push_back(
"cols CDATA #REQUIRED");
103 theMWPCAttr.push_back(
"idtype ( uint | int | short | ushort ) #REQUIRED");
104 theMWPCAttr.push_back(
"xtype ( float | double ) #REQUIRED");
105 theMWPCAttr.push_back(
"ytype ( float | double ) #REQUIRED");
109 std::vector<std::string> theScintAttr;
110 theScintAttr.push_back(
"name CDATA #REQUIRED");
111 theScintAttr.push_back(
"cols CDATA #REQUIRED");
112 theScintAttr.push_back(
"idtype ( uint | int | short | ushort ) #REQUIRED");
113 theScintAttr.push_back(
"signal ( float | double ) #REQUIRED");
122 std::vector<std::string> theEventValues(theEventAttr.size());
123 for (
unsigned int i=0; i<theEventAttr.size(); i++ )
125 if ( (theEventAttr[i]).
find(
"name") != std::string::npos )
127 theEventValues[i] =
"EventInfo";
130 theEventAttr[i].substr(0,theEventAttr[i].find_first_of(
" "));
132 this->
openElement(outStream,
"EventInfo",theEventAttr,theEventValues);
138 std::vector<std::string> theHeaderValues(theHeaderAttr.size());
139 for (
unsigned int i=0; i<theHeaderAttr.size(); i++ )
141 if ( (theHeaderAttr[i]).
find(
"name") != std::string::npos )
143 theHeaderValues[i] =
"EventInfo";
145 else if ( (theHeaderAttr[i]).
find(
"run") != std::string::npos )
147 std::ostringstream theValue; theValue << theRun << std::ends;
148 theHeaderValues[i] = theValue.str();
150 else if ( (theHeaderAttr[i]).
find(
"event") != std::string::npos )
152 std::ostringstream theValue; theValue << theEvent << std::ends;
153 theHeaderValues[i] = theValue.str();
155 else if ( (theHeaderAttr[i]).
find(
"type") != std::string::npos )
157 std::ostringstream theValue; theValue << theType << std::ends;
158 theHeaderValues[i] = theValue.str();
162 theHeaderValues[i] =
"unknown";
165 theHeaderAttr[i].substr(0,theHeaderAttr[i].find_first_of(
" "));
169 theHeaderAttr,theHeaderValues);
193 outStream << std::endl;
197 return StatusCode::SUCCESS;