/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/lcio/src/cpp/src/CPPFORT/lccol.cc File Reference

#include "CPPFORT/lccol.h"
#include "lcio.h"
#include "Exceptions.h"
#include "IOIMPL/LCFactory.h"
#include "IMPL/LCRunHeaderImpl.h"
#include "IMPL/LCCollectionVec.h"
#include "IMPL/LCEventImpl.h"
#include "IMPL/LCTOOLS.h"
#include "EVENT/MCParticle.h"
#include "EVENT/SimCalorimeterHit.h"
#include "EVENT/CalorimeterHit.h"
#include "EVENT/SimTrackerHit.h"
#include "EVENT/TPCHit.h"
#include "EVENT/LCIO.h"
#include <iostream>

Include dependency graph for lccol.cc:

Go to the source code of this file.

Functions

PTRTYPE lccolcreate (const char *colname)
int lccoldelete (PTRTYPE collection)
int lccolgetnumberofelements (PTRTYPE collection)
char * lccolgettypename (PTRTYPE collection)
PTRTYPE lccolgetelementat (PTRTYPE collection, int index)
int lccolgetflag (PTRTYPE collection)
bool lccolistransient (PTRTYPE collection)
int lccolsettransient (PTRTYPE collection, bool value)
bool lccolisdefault (PTRTYPE collection)
int lccolsetdefault (PTRTYPE collection, bool value)
int lccolsetflag (PTRTYPE collection, int flag)
int lccoladdelement (PTRTYPE collection, PTRTYPE object)
int lccolremoveelementat (PTRTYPE collection, int i)


Function Documentation

PTRTYPE lccolcreate ( const char *  colname  ) 

Definition at line 22 of file lccol.cc.

00022                                           {
00023   LCCollectionVec* col = new LCCollectionVec( colname ) ;
00024   return reinterpret_cast<PTRTYPE>( col ) ;
00025 }

int lccoldelete ( PTRTYPE  collection  ) 

Definition at line 26 of file lccol.cc.

00026                                      {
00027   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00028   delete col ;
00029   return LCIO::SUCCESS ;
00030 }

int lccolgetnumberofelements ( PTRTYPE  collection  ) 

Definition at line 32 of file lccol.cc.

00032                                                   {
00033   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00034   return col->getNumberOfElements() ;
00035 }

char* lccolgettypename ( PTRTYPE  collection  ) 

Definition at line 37 of file lccol.cc.

00037                                             {
00038   const LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>( (collection) ) ;
00039   return const_cast<char*>( col->getTypeName().c_str() ) ;
00040 }

PTRTYPE lccolgetelementat ( PTRTYPE  collection,
int  index 
)

Definition at line 42 of file lccol.cc.

00042                                                           {
00043   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00044 //  return  reinterpret_cast<PTRTYPE>( col->getElementAt( index - 1 )  ) ;
00045   return C2F_POINTER( LCObject*, col->getElementAt( index - 1 )  ) ;
00046 }

int lccolgetflag ( PTRTYPE  collection  ) 

Definition at line 48 of file lccol.cc.

00048                                     {
00049   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00050   return col->getFlag() ;
00051 }

bool lccolistransient ( PTRTYPE  collection  ) 

Definition at line 53 of file lccol.cc.

00053                                          {
00054   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00055   return col->isTransient() ;
00056 }

int lccolsettransient ( PTRTYPE  collection,
bool  value 
)

Definition at line 58 of file lccol.cc.

00058                                                      {
00059   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00060   col->setTransient( value) ;
00061   return LCIO::SUCCESS ;
00062 }

bool lccolisdefault ( PTRTYPE  collection  ) 

Definition at line 63 of file lccol.cc.

00063                                        {
00064   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00065   return col->isDefault() ;
00066 }

int lccolsetdefault ( PTRTYPE  collection,
bool  value 
)

Definition at line 68 of file lccol.cc.

00068                                                    {
00069   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00070   col->setDefault( value) ;
00071   return LCIO::SUCCESS ;
00072 }

int lccolsetflag ( PTRTYPE  collection,
int  flag 
)

Definition at line 74 of file lccol.cc.

00074                                               {
00075   LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00076   col->setFlag( flag) ;
00077   return LCIO::SUCCESS ;
00078 }

int lccoladdelement ( PTRTYPE  collection,
PTRTYPE  object 
)

Definition at line 79 of file lccol.cc.

00079                                                        {
00080   try{
00081     LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00082     col->addElement( reinterpret_cast<LCObject*>(object) ) ;
00083 
00084   }catch(...){ return LCIO::ERROR ; }
00085   return LCIO::SUCCESS ;
00086 }

int lccolremoveelementat ( PTRTYPE  collection,
int  i 
)

Definition at line 88 of file lccol.cc.

00088                                                    {
00089   try{
00090     LCCollectionVec* col = reinterpret_cast<LCCollectionVec*>(collection) ;
00091     col->removeElementAt( i ) ;
00092   }catch(...){ return LCIO::ERROR ; }
00093   return LCIO::SUCCESS ;
00094 }


Generated on Mon Jan 7 13:16:37 2013 for MicromegasFramework by  doxygen 1.4.7