| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

CollectionCloneAlg.cpp
Go to the documentation of this file.
1 // ====================================================================
2 // CollectionCloneAlg.cpp
3 // --------------------------------------------------------------------
4 //
5 // Author : Markus Frank
6 //
7 // ====================================================================
8 #include "GaudiKernel/IDataProviderSvc.h"
9 #include "GaudiKernel/ISelectStatement.h"
10 #include "GaudiKernel/IDataManagerSvc.h"
11 #include "GaudiKernel/GenericAddress.h"
12 #include "GaudiKernel/SmartDataPtr.h"
13 #include "GaudiKernel/AttribStringParser.h"
14 #include "GaudiKernel/IRegistry.h"
15 #include "GaudiKernel/Algorithm.h"
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/SmartIF.h"
18 #include "GaudiKernel/NTuple.h"
19 #include "GaudiKernel/ObjectFactory.h"
20 #include <vector>
21
22 namespace {
23 template <class T> static long upper(const INTupleItem* item) {
24 const NTuple::_Data<T>* it = dynamic_cast<const NTuple::_Data<T>*>(item);
25 return long(it->range().upper());
26 }
27
28 template<class TYP> static
29 StatusCode createItem (MsgStream& log,
30 INTuple* tuple,
31 INTupleItem* src,
32 const TYP& null)
33 {
34 NTuple::_Data<TYP>* source = dynamic_cast<NTuple::_Data<TYP>*>(src);
35 TYP low = source->range().lower();
36 TYP high = source->range().upper();
37 long hasIdx = source->hasIndex();
38 long ndim = source->ndim();
39 const std::string& name = source->name();
40 std::string idxName;
41 long dim[4], idxLen = 0;
42 long dim1 = 1, dim2 = 1;
43 INTupleItem* it = 0;
44 for ( int i = 0; i < ndim; i++ )
45 dim[i] = source->dim(i);
47 if ( hasIdx ) {
48 const INTupleItem* index = source->indexItem();
49 idxName = index->name();
50 switch( index->type() ) {
51 case DataTypeInfo::UCHAR:
52 idxLen = upper<unsigned char>(index);
53 break;
54 case DataTypeInfo::USHORT:
55 idxLen = upper<unsigned short>(index);
56 break;
57 case DataTypeInfo::UINT:
58 idxLen = upper<unsigned int>(index);
59 break;
60 case DataTypeInfo::ULONG:
61 idxLen = upper<unsigned long>(index);
62 break;
63 case DataTypeInfo::CHAR:
64 idxLen = upper<char>(index);
65 break;
66 case DataTypeInfo::SHORT:
67 idxLen = upper<short>(index);
68 break;
69 case DataTypeInfo::INT:
70 idxLen = upper<int>(index);
71 break;
72 case DataTypeInfo::LONG:
73 idxLen = upper<long>(index);
74 break;
75 default:
76 log << MSG::ERROR << "Column " << idxName
77 << " is not a valid index column!" << endmsg;
78 return StatusCode::FAILURE;
79 }
80 }
81 switch( ndim ) {
82 case 0:
83 it = NTuple::_Item<TYP>::create (tuple, name, typeid(TYP), low, high, null);
84 break;
85 case 1:
86 dim1 = (hasIdx) ? idxLen : dim[0];
87 it = NTuple::_Array<TYP>::create (tuple,
88 name,
89 typeid(TYP),
90 idxName,
91 dim1,
92 low,
93 high,
94 null);
95 break;
96 case 2:
97 dim1 = (hasIdx) ? idxLen : dim[0];
98 dim2 = (hasIdx) ? dim[0] : dim[1];
99 it = NTuple::_Matrix<TYP>::create ( tuple,
100 name,
101 typeid(TYP),
102 idxName,
103 dim1,
104 dim2,
105 low,
106 high,
107 null);
108 break;
109 default:
110 return StatusCode::FAILURE;
111 }
112 return tuple->add(it);
113 }
114 }
115
126 class CollectionCloneAlg : public Algorithm {
128 SmartIF<INTupleSvc> m_dataSvc;
130 std::string m_tupleSvc;
132 std::string m_output;
134 std::vector<std::string> m_inputs;
136 std::string m_rootName;
138 std::string m_outName;
140 std::string m_criteria;
142 std::string m_selectorName;
143 public:
144
146 CollectionCloneAlg(const std::string& name, ISvcLocator* pSvcLocator)
147 : Algorithm(name, pSvcLocator)
148 {
149 declareProperty("EvtTupleSvc", m_tupleSvc="EvtTupleSvc");
150 declareProperty("Input", m_inputs);
151 declareProperty("Output", m_output);
152 }
154 virtual ~CollectionCloneAlg() {
155 }
156
158 virtual StatusCode initialize() {
159 MsgStream log(msgSvc(), name());
160 m_rootName = "";
161 m_outName = "";
162 m_criteria = "";
163 m_selectorName = "";
164 m_dataSvc = service(m_tupleSvc, true);
165 if ( !m_dataSvc ) {
166 log << MSG::ERROR << "Failed to access service \""
167 << m_tupleSvc << "\"." << endmsg;
168 return StatusCode::FAILURE;
169 }
170 std::string fun;
171 using Parser = Gaudi::Utils::AttribStringParser;
172 for (auto attrib: Parser(m_output)) {
173 switch( ::toupper(attrib.tag[0]) ) {
174 case 'D':
175 m_outName = std::move(attrib.value);
176 break;
177 case 'S':
178 m_criteria = std::move(attrib.value);
179 break;
180 case 'F':
181 fun = std::move(attrib.value);
182 break ;
183 default:
184 break;
185 }
186 }
187 if ( m_outName.empty() ) {
188 log << MSG::ERROR << "Failed to analyze output specs:" << m_output << endmsg;
189 return StatusCode::FAILURE;
190 }
191 if ( !fun.empty() || !m_criteria.empty() ) {
192 if ( !m_criteria.empty() && fun.empty() ) fun = "NTuple::Selector";
193 m_selectorName = fun;
194 }
195 return StatusCode::SUCCESS;
196 }
197
199 virtual StatusCode finalize() {
200 m_dataSvc.reset();
201 return StatusCode::SUCCESS;
202 }
203
205 virtual StatusCode execute() {
206 StatusCode status = connect();
207 if ( status.isSuccess() ) {
208 status = mergeInputTuples();
209 }
210 return status;
211 }
212
214 virtual StatusCode book(const NTuple::Tuple* nt) {
215 MsgStream log(msgSvc(), name());
216 const INTuple::ItemContainer& items = nt->items();
217 StatusCode status = StatusCode::SUCCESS;
218 INTuple::ItemContainer::const_iterator i;
219 NTuple::Tuple* tuple = m_dataSvc->book(m_outName, nt->clID(), nt->title());
220 for (i = items.begin(); i != items.end(); ++i) {
221 long type = (*i)->type();
222 switch(type) {
223 case DataTypeInfo::UCHAR:
224 status = createItem(log, tuple, *i, (unsigned char)0);
225 break;
226 case DataTypeInfo::USHORT:
227 status = createItem(log, tuple, *i, (unsigned short)0);
228 break;
229 case DataTypeInfo::UINT:
230 status = createItem(log, tuple, *i, (unsigned int)0);
231 break;
232 case DataTypeInfo::ULONG:
233 status = createItem(log, tuple, *i, (unsigned long)0);
234 break;
235 case DataTypeInfo::CHAR:
236 status = createItem(log, tuple, *i, char(0));
237 break;
238 case DataTypeInfo::SHORT:
239 status = createItem(log, tuple, *i, short(0));
240 break;
241 case DataTypeInfo::INT:
242 status = createItem(log, tuple, *i, int(0));
243 break;
244 case DataTypeInfo::LONG:
245 status = createItem(log, tuple, *i, long(0));
246 break;
247 case DataTypeInfo::BOOL:
248 status = createItem(log, tuple, *i, false);
249 break;
250 case DataTypeInfo::FLOAT:
251 status = createItem(log, tuple, *i, float(0.0));
252 break;
253 case DataTypeInfo::DOUBLE:
254 status = createItem(log, tuple, *i, double(0.0));
255 break;
256 case DataTypeInfo::OBJECT_ADDR:
257 status = createItem(log, tuple, *i, (IOpaqueAddress*)0);
258 break;
259 case DataTypeInfo::POINTER:
260 status = createItem(log, tuple, *i, (void*)0);
261 break;
262 case DataTypeInfo::STRING:
263 // status = createItem(log, tuple, *i, (std::string*)0);
264 // break;
265 case DataTypeInfo::NTCHAR:
266 // status = createItem(log, tuple, *i, (char*)0);
267 // break;
268 case DataTypeInfo::UNKNOWN:
269 default:
270 status = StatusCode::FAILURE;
271 break;
272 }
273 }
274 return status;
275 }
276
277 // Perform some basic checks
278 virtual StatusCode checkInput(const NTuple::Tuple* clone, const NTuple::Tuple* src) {
279 MsgStream log(msgSvc(), name());
280 if ( 0 != clone && 0 != src ) {
281 const INTuple::ItemContainer& clone_items = clone->items();
282 const std::string clone_id = clone->registry()->identifier();
283 const std::string src_id = src->registry()->identifier();
284
285 INTuple::ItemContainer::const_iterator i;
286 log << MSG::ERROR;
287 for (i = clone_items.begin(); i != clone_items.end(); ++i) {
288 const INTupleItem* itm = *i;
289 const std::string& nam = itm->name();
290 const INTupleItem* src_itm = src->find(nam);
291 if ( !src_itm ) {
292 log << "Tuple item " << nam << " not present in " << src_id << endmsg;
293 return StatusCode::FAILURE;
294 }
295 if ( itm->type() != src_itm->type() ) {
296 log << "Tuple item " << nam << " are of different types in "
297 << src_id << ":" << src_itm->typeName() << " <-> "
298 << clone_id << ":" << itm->typeName() << endmsg;
299 return StatusCode::FAILURE;
300 }
301 if ( itm->ndim() != src_itm->ndim() ) {
302 log << "Tuple item " << nam << " have different dimensions in "
303 << src_id << ":" << src_itm->ndim() << " <-> "
304 << clone_id << ":" << itm->ndim() << endmsg;
305 return StatusCode::FAILURE;
306 }
307 for (int j=0; j<itm->ndim(); ++j) {
308 if ( src_itm->dim(j) != itm->dim(j) ) {
309 log << "Tuple item " << nam << " have different dimensions in "
310 << src_id << "[" << j << "]:" << src_itm->dim(j) << " <-> "
311 << clone_id << "[" << j << "]:" << itm->dim(j) << endmsg;
312 return StatusCode::FAILURE;
313 }
314 }
315 if ( itm->hasIndex() != src_itm->hasIndex() ) {
316 log << "Tuple item " << nam << " has different index colums "
317 << src_id << ":" << src_itm->hasIndex() << " <-> "
318 << clone_id << ":" << itm->hasIndex() << endmsg;
319 return StatusCode::FAILURE;
320 }
321 if ( itm->hasIndex() ) {
322 if ( itm->index() != src_itm->index() ) {
323 log << "Tuple item " << nam << " has different index colums "
324 << src_id << ":" << src_itm->index() << " <-> "
325 << clone_id << ":" << itm->index() << endmsg;
326 return StatusCode::FAILURE;
327 }
328 }
329 }
330 return StatusCode::SUCCESS;
331 }
332 return StatusCode::FAILURE;
333 }
334
336 StatusCode mergeEntries(const std::string& input) {
337 MsgStream log(msgSvc(), name());
338 NTuplePtr out(m_dataSvc.get(), m_outName);
339 if ( 0 != out ) {
340 const INTuple::ItemContainer& clone_items = out->items();
341 std::vector<GenericAddress> addrVector(clone_items.size());
342 StatusCode status = StatusCode::SUCCESS;
343 NTuplePtr nt(m_dataSvc.get(), input);
344 size_t k = 0, nentry = 0;
345 if ( 0 != nt ) {
346 const INTuple::ItemContainer& source_items = nt->items();
347 for (k=0; k < source_items.size(); ++k ) {
348 if ( source_items[k]->type() == DataTypeInfo::OBJECT_ADDR ) {
349 *(IOpaqueAddress**)source_items[k]->buffer() = &addrVector[k];
350 }
351 }
352 while ( status.isSuccess() ) {
353 status = m_dataSvc->readRecord(nt.ptr());
354 if ( status.isSuccess() ) {
355 INTuple::ItemContainer::const_iterator i;
356 nentry++;
357 for (k=0,i = source_items.begin(); i != source_items.end(); ++i,++k) {
358 const INTupleItem* src_itm = *i;
359 const INTupleItem* out_itm = out->find(src_itm->name());
360 size_t size = 0;
361 switch((*i)->type()) {
362 case DataTypeInfo::UCHAR:
363 size = sizeof(unsigned char);
364 break;
365 case DataTypeInfo::USHORT:
366 size = sizeof(unsigned short);
367 break;
368 case DataTypeInfo::UINT:
369 size = sizeof(unsigned int);
370 break;
371 case DataTypeInfo::ULONG:
372 size = sizeof(unsigned long);
373 break;
374 case DataTypeInfo::CHAR:
375 size = sizeof(char);
376 break;
377 case DataTypeInfo::SHORT:
378 size = sizeof(short);
379 break;
380 case DataTypeInfo::INT:
381 size = sizeof(int);
382 break;
383 case DataTypeInfo::LONG:
384 size = sizeof(long);
385 break;
386 case DataTypeInfo::BOOL:
387 size = sizeof(bool);
388 break;
389 case DataTypeInfo::FLOAT:
390 size = sizeof(float);
391 break;
392 case DataTypeInfo::DOUBLE:
393 size = sizeof(double);
394 break;
395 case DataTypeInfo::STRING:
396 *(std::string*)out_itm->buffer() = *(std::string*)src_itm->buffer();
397 size = 0;
398 break;
399 case DataTypeInfo::NTCHAR:
400 size = ::strlen((const char*)src_itm->buffer())+1;
401 break;
402 case DataTypeInfo::POINTER:
403 {
404 *(void**)out_itm->buffer() = *(void**)src_itm->buffer();
405 size = 0;
406 }
407 break;
408 case DataTypeInfo::OBJECT_ADDR:
409 {
410 IOpaqueAddress* ppA1 = &addrVector[k];
411 IOpaqueAddress** ppA2 = (IOpaqueAddress**)out_itm->buffer();
412 *ppA2 = ppA1;
413 size = 0;
414 }
415 break;
416 case DataTypeInfo::UNKNOWN:
417 default:
418 size = 0;
419 break;
420 }
421 if ( size > 0 ) {
422 ::memcpy((void*)out_itm->buffer(), src_itm->buffer(), size*src_itm->length());
423 }
424 }
425 status = m_dataSvc->writeRecord(out.ptr());
426 if ( !status.isSuccess() ) {
427 log << MSG::ERROR << "Failed to write record " << nentry
428 << " from " << input << " to " << m_outName << endmsg;
429 }
430 }
431 }
432 log << MSG::INFO << "End of reading tuple " << input
433 << " after " << nentry << " entries." << endmsg;
434
435 if ( nentry > 0 || m_selectorName != "" ) {
436 return StatusCode::SUCCESS;
437 }
438 return StatusCode::FAILURE;
439 }
440 log << MSG::ERROR << "Failed to access input: " << input << endmsg;
441 }
442 return StatusCode::FAILURE;
443 }
444
446 StatusCode connect() {
447 StatusCode status = StatusCode::SUCCESS;
448 for (size_t i=0; i < m_inputs.size(); ++i) {
449 NTuplePtr nt(m_dataSvc.get(), m_inputs[i]);
450 if ( !(0 == nt) ) {
451 NTuplePtr out(m_dataSvc.get(), m_outName);
452 if ( 0 == out ) {
453 status = book(nt);
454 } else {
455 status = checkInput(out, nt);
456 }
457 if ( !status.isSuccess() ) {
458 return status;
459 }
460 else if ( m_selectorName != "" ) {
461 SmartIF<ISelectStatement> stmt(ObjFactory::create(m_selectorName, serviceLocator()));
462 if ( stmt ) {
463 if ( !m_criteria.empty() ) stmt->setCriteria(m_criteria);
464 nt->attachSelector(stmt);
465 } else {
466 MsgStream log(msgSvc(), name());
467 log << MSG::ERROR << "Failed to attach tuple selector to " << m_inputs[i] << endmsg;
468 return StatusCode::FAILURE;
469 }
470 }
471 } else {
472 MsgStream log(msgSvc(), name());
473 log << MSG::ERROR << "Failed to access tuple: " << m_inputs[i] << endmsg;
474 return StatusCode::FAILURE;
475 }
476 }
477 return StatusCode::SUCCESS;
478 }
479
481 StatusCode mergeInputTuples() {
482 MsgStream log(msgSvc(), name());
483 for( const auto& input : m_inputs ) {
484 StatusCode sc = mergeEntries(input);
485 if ( !sc.isSuccess() ) {
486 log << MSG::ERROR << "Failed to merge tuple:" << input << endmsg;
487 return sc;
488 }
489 }
490 return StatusCode::SUCCESS;
491 }
492 };
493 DECLARE_COMPONENT(CollectionCloneAlg)
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
CollectionCloneAlg::m_tupleSvc
std::string m_tupleSvc
Name of the data provider service.
Definition: CollectionCloneAlg.cpp:130
CollectionCloneAlg::m_criteria
std::string m_criteria
Selection criteria (if any)
Definition: CollectionCloneAlg.cpp:140
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Algorithm.h
SmartIF< INTupleSvc >
std::string::empty
T empty(T...args)
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
INTupleItem::type
virtual long type() const =0
Type information of the item.
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
MsgStream.h
ana.itm
tuple itm
Definition: ana.py:57
CollectionCloneAlg::book
virtual StatusCode book(const NTuple::Tuple *nt)
Book the N-tuple according to the specification.
Definition: CollectionCloneAlg.cpp:214
Gaudi.Configuration.log
tuple log
Definition: Configuration.py:13
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
NTuple.h
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:929
CollectionCloneAlg::CollectionCloneAlg
CollectionCloneAlg(const std::string &name, ISvcLocator *pSvcLocator)
Standard algorithm constructor.
Definition: CollectionCloneAlg.cpp:146
INTuple::add
virtual StatusCode add(INTupleItem *item)=0
Add an item row to the N tuple.
ObjectFactory.h
INTuple::title
virtual const std::string & title() const =0
Object title.
Algorithm::declareProperty
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Algorithm.h:426
ISelectStatement.h
NTuple::_Data::range
virtual const ItemRange & range() const =0
Access the range if specified.
std::vector::end
T end(T...args)
CollectionCloneAlg::~CollectionCloneAlg
virtual ~CollectionCloneAlg()
Standard Destructor.
Definition: CollectionCloneAlg.cpp:154
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:168
merge_files.sc
int sc
Definition: merge_files.py:167
INTupleItem::hasIndex
virtual bool hasIndex() const =0
Is the tuple have an index item?
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:74
NTuple::_Array::create
static _Array * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long len, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:32
INTupleItem::name
virtual const std::string & name() const =0
Access _Item name.
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
CollectionCloneAlg::m_dataSvc
SmartIF< INTupleSvc > m_dataSvc
Reference to data provider service.
Definition: CollectionCloneAlg.cpp:128
std::string
STL class.
CollectionCloneAlg::mergeEntries
StatusCode mergeEntries(const std::string &input)
Merge the entries of a single input tuple into the output.
Definition: CollectionCloneAlg.cpp:336
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:820
INTuple
NTuple interface class definition.
Definition: INTuple.h:79
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
CollectionCloneAlg::m_output
std::string m_output
Output specification.
Definition: CollectionCloneAlg.cpp:132
CollectionCloneAlg::m_inputs
std::vector< std::string > m_inputs
input specifications
Definition: CollectionCloneAlg.cpp:134
INTupleItem
NTuple interface class definition.
Definition: INTuple.h:26
IDataManagerSvc.h
IDataProviderSvc.h
SmartDataPtr.h
DataObject::clID
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:68
StatusCode::FAILURE
Definition: StatusCode.h:29
INTupleItem::indexItem
virtual INTupleItem * indexItem()=0
Pointer to index column (if present, 0 else)
StatusCode::SUCCESS
Definition: StatusCode.h:30
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
INTupleSvc::writeRecord
virtual StatusCode writeRecord(NTuple::Tuple *tuple)=0
Write single record to N tuple.
CollectionCloneAlg::m_outName
std::string m_outName
Output tuple name.
Definition: CollectionCloneAlg.cpp:138
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
SmartIF.h
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
CollectionCloneAlg::mergeInputTuples
StatusCode mergeInputTuples()
Merge all N-tuple entries.
Definition: CollectionCloneAlg.cpp:481
INTupleItem::dim
virtual long dim(long i) const =0
Access individual dimensions.
IRegistry.h
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
NTuple::_Data
Abstract class describing basic data in an Ntuple.
Definition: NTuple.h:37
CollectionCloneAlg::checkInput
virtual StatusCode checkInput(const NTuple::Tuple *clone, const NTuple::Tuple *src)
Definition: CollectionCloneAlg.cpp:278
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
std::move
T move(T...args)
CollectionCloneAlg::m_rootName
std::string m_rootName
Name of the root leaf (obtained at initialize)
Definition: CollectionCloneAlg.cpp:136
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:370
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
std::vector::size
T size(T...args)
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28
std::vector< std::string >
CollectionCloneAlg::initialize
virtual StatusCode initialize()
Initialize.
Definition: CollectionCloneAlg.cpp:158
std::vector::begin
T begin(T...args)
INTupleItem::ndim
virtual long ndim() const =0
Dimension.
CollectionCloneAlg::connect
StatusCode connect()
Connect input and output N-tuples.
Definition: CollectionCloneAlg.cpp:446
CollectionCloneAlg::execute
virtual StatusCode execute()
Execute procedure.
Definition: CollectionCloneAlg.cpp:205
CollectionCloneAlg::finalize
virtual StatusCode finalize()
Finalize.
Definition: CollectionCloneAlg.cpp:199
fun
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26
CollectionCloneAlg
Small algorithm, which allows to merge N-tuples in a generic way.
Definition: CollectionCloneAlg.cpp:126
INTupleSvc::readRecord
virtual StatusCode readRecord(NTuple::Tuple *tuple)=0
Read single record from N tuple.
ana.item
tuple item
print s1,s2
Definition: ana.py:146
AttribStringParser.h
SmartDataPtr
A small class used to access easily (and efficiently) data items residing in data stores...
Definition: SmartDataPtr.h:46
CommonMessagingBase::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: CommonMessaging.h:73
MSG::ERROR
Definition: IMessageSvc.h:21
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
INTuple::items
virtual ItemContainer & items()=0
Access item container.
NTuple::_Item::create
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:26
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26
Algorithm::service
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Algorithm.h:232
INTupleItem::typeName
virtual std::string typeName() const =0
Proper type name of the object.
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
MSG::INFO
Definition: IMessageSvc.h:19
CollectionCloneAlg::m_selectorName
std::string m_selectorName
Selector factory.
Definition: CollectionCloneAlg.cpp:142
ISelectStatement::setCriteria
virtual void setCriteria(const std::string &crit)=0
Set the type.
ana.i
list i
Definition: ana.py:128
GenericAddress.h
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:10
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
INTuple::find
virtual const INTupleItem * find(const std::string &name) const =0
Find an item row of the Ntuple (CONST)
INTupleSvc::book
virtual NTuple::Tuple * book(const std::string &fullPath, const CLID &type, const std::string &title)=0
Book Ntuple and register it with the data store.
INTupleItem::index
virtual const std::string & index() const =0
Access the index _Item.
NTuple::_Matrix::create
static _Matrix * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:38
INTupleItem::length
virtual long length() const =0
Access the buffer length.
INTupleItem::buffer
virtual const void * buffer() const =0
Access data buffer (CONST)