33{
34
36
37 log << MSG::DEBUG <<
"EntryTag: "<< entryTag <<
endmsg;
38
39
40 const EventContext& ctx = Gaudi::Hive::currentContext();
41 unsigned int theRun = ctx.eventID().run_number();
42 unsigned int theEvent = ctx.eventID().event_number();
43 unsigned int theType = 0;
44
46
48
49
50 std::vector<std::string> theEventElements;
51 theEventElements.push_back("EventHeader");
52 theEventElements.push_back("(CaloCellContainer*)?");
53 theEventElements.push_back("(BeamWireChambers*)?");
54 theEventElements.push_back("(BeamProfileChambers*)?");
55 theEventElements.push_back("(BeamScintillators*)?");
56 theEventElements.push_back("(TailCatcher*)?");
57 theEventElements.push_back("(PatternUnit*)?");
59 std::vector<std::string> theEventAttr;
60 theEventAttr.push_back("name CDATA #REQUIRED");
62
63
64 std::vector<std::string> theHeaderElements;
65
66
68 std::vector<std::string> theHeaderAttr;
69 theHeaderAttr.push_back("name CDATA #REQUIRED");
70 theHeaderAttr.push_back("run CDATA #REQUIRED");
71 theHeaderAttr.push_back("event CDATA #REQUIRED");
72 theHeaderAttr.push_back("type CDATA #REQUIRED");
74
75
76
77
78
79
80
81
82 std::vector<std::string> anyData;
83 anyData.push_back("ANY");
85 std::vector<std::string> theCaloAttr;
86 theCaloAttr.push_back("name CDATA #REQUIRED");
87 theCaloAttr.push_back("ncols CDATA #REQUIRED");
88 theCaloAttr.push_back("nrows CDATA #REQUIRED");
89 theCaloAttr.push_back("idtype ( uint | int | short | ushort ) #REQUIRED");
90 theCaloAttr.push_back("etype ( float | double ) #REQUIRED");
91 this->
addAttributes(outStream,
"CaloCellContainer",theCaloAttr);
92
93
95 std::vector<std::string> theBPCAttr;
96 theBPCAttr.push_back("name CDATA #REQUIRED");
97 theBPCAttr.push_back("cols CDATA #REQUIRED");
98 theBPCAttr.push_back("idtype ( uint | int | short | ushort ) #REQUIRED");
99 theBPCAttr.push_back("xtype ( float | double ) #REQUIRED");
100 theBPCAttr.push_back("ytype ( float | double ) #REQUIRED");
101
102
104 std::vector<std::string> theMWPCAttr;
105 theMWPCAttr.push_back("name CDATA #REQUIRED");
106 theMWPCAttr.push_back("cols CDATA #REQUIRED");
107 theMWPCAttr.push_back("idtype ( uint | int | short | ushort ) #REQUIRED");
108 theMWPCAttr.push_back("xtype ( float | double ) #REQUIRED");
109 theMWPCAttr.push_back("ytype ( float | double ) #REQUIRED");
110
111
113 std::vector<std::string> theScintAttr;
114 theScintAttr.push_back("name CDATA #REQUIRED");
115 theScintAttr.push_back("cols CDATA #REQUIRED");
116 theScintAttr.push_back("idtype ( uint | int | short | ushort ) #REQUIRED");
117 theScintAttr.push_back("signal ( float | double ) #REQUIRED");
118
119
121
123
125
126 std::vector<std::string> theEventValues(theEventAttr.size());
127 for (
unsigned int i=0;
i<theEventAttr.size();
i++ )
128 {
129 if ( (theEventAttr[i]).
find(
"name") != std::string::npos )
130 {
131 theEventValues[
i] =
"EventInfo";
132 }
134 theEventAttr[
i].substr(0,theEventAttr[i].find_first_of(
" "));
135 }
136 this->
openElement(outStream,
"EventInfo",theEventAttr,theEventValues);
137
139
141
142 std::vector<std::string> theHeaderValues(theHeaderAttr.size());
143 for (
unsigned int i=0;
i<theHeaderAttr.size();
i++ )
144 {
145 if ( (theHeaderAttr[i]).
find(
"name") != std::string::npos )
146 {
147 theHeaderValues[
i] =
"EventInfo";
148 }
149 else if ( (theHeaderAttr[i]).
find(
"run") != std::string::npos )
150 {
151 std::ostringstream theValue; theValue <<
theRun << std::ends;
152 theHeaderValues[
i] = theValue.str();
153 }
154 else if ( (theHeaderAttr[i]).
find(
"event") != std::string::npos )
155 {
156 std::ostringstream theValue; theValue << theEvent << std::ends;
157 theHeaderValues[
i] = theValue.str();
158 }
159 else if ( (theHeaderAttr[i]).
find(
"type") != std::string::npos )
160 {
161 std::ostringstream theValue; theValue << theType << std::ends;
162 theHeaderValues[
i] = theValue.str();
163 }
164 else
165 {
166 theHeaderValues[
i] =
"unknown";
167 }
169 theHeaderAttr[
i].substr(0,theHeaderAttr[i].find_first_of(
" "));
170 }
171
173 theHeaderAttr,theHeaderValues);
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197 outStream << std::endl;
199
200
201 return StatusCode::SUCCESS;
202}
msgSvc
Provide convenience handles for various services.