29{
30
32
33 log << MSG::DEBUG <<
"EntryTag: "<< entryTag <<
endmsg;
34
35
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;
40
42
44
45
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");
58
59
60 std::vector<std::string> theHeaderElements;
61
62
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");
70
71
72
73
74
75
76
77
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);
88
89
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");
97
98
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");
106
107
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");
114
115
117
119
121
122 std::vector<std::string> theEventValues(theEventAttr.size());
123 for (
unsigned int i=0;
i<theEventAttr.size();
i++ )
124 {
125 if ( (theEventAttr[i]).
find(
"name") != std::string::npos )
126 {
127 theEventValues[
i] =
"EventInfo";
128 }
130 theEventAttr[
i].substr(0,theEventAttr[i].find_first_of(
" "));
131 }
132 this->
openElement(outStream,
"EventInfo",theEventAttr,theEventValues);
133
135
137
138 std::vector<std::string> theHeaderValues(theHeaderAttr.size());
139 for (
unsigned int i=0;
i<theHeaderAttr.size();
i++ )
140 {
141 if ( (theHeaderAttr[i]).
find(
"name") != std::string::npos )
142 {
143 theHeaderValues[
i] =
"EventInfo";
144 }
145 else if ( (theHeaderAttr[i]).
find(
"run") != std::string::npos )
146 {
147 std::ostringstream theValue; theValue <<
theRun << std::ends;
148 theHeaderValues[
i] = theValue.str();
149 }
150 else if ( (theHeaderAttr[i]).
find(
"event") != std::string::npos )
151 {
152 std::ostringstream theValue; theValue << theEvent << std::ends;
153 theHeaderValues[
i] = theValue.str();
154 }
155 else if ( (theHeaderAttr[i]).
find(
"type") != std::string::npos )
156 {
157 std::ostringstream theValue; theValue << theType << std::ends;
158 theHeaderValues[
i] = theValue.str();
159 }
160 else
161 {
162 theHeaderValues[
i] =
"unknown";
163 }
165 theHeaderAttr[
i].substr(0,theHeaderAttr[i].find_first_of(
" "));
166 }
167
169 theHeaderAttr,theHeaderValues);
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193 outStream << std::endl;
195
196
197 return StatusCode::SUCCESS;
198}