Changeset 2669 in Sophya for trunk/SophyaPI/PIext/nobjmgr.cc


Ignore:
Timestamp:
Apr 15, 2005, 3:01:05 PM (20 years ago)
Author:
cmv
Message:
  • n/read pour creer et remplir un ntuple a partir d'un choix de colonnes d'un fichier ASCII
  • n/merge pour merger des ntuples dans un ntuple unique
  • savelist pour sauver une liste d'objects dans un fichier ppf

cmv 15/04/2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/nobjmgr.cc

    r2651 r2669  
    12051205
    12061206/* --Methode-- */
     1207void NamedObjMgr::SaveListObjects(vector<string> &liste)
     1208// Les n-1 premiers elements (liste[0 -> n-2]) contiennent
     1209// les noms des objects a mettre  dans le fichier ppf
     1210// dont le nom est le dernier argument (liste[n-1])
     1211{
     1212 ZSync(*myMutex);
     1213
     1214 if(liste.size()<2) {
     1215   cerr<<"NamedObjMgr::SaveListObjects()/Error not enough argument"<<endl;
     1216   return;
     1217 }
     1218
     1219 // open ppf file
     1220 string ppfname = liste[liste.size()-1];
     1221 POutPersist* pout=NULL;
     1222 try {
     1223   pout = new POutPersist(ppfname);
     1224 } catch(IOExc iox) {
     1225   cerr<<"NamedObjMgr::SaveObjects()/Error Exception - Msg= "<<iox.Msg()<<endl;
     1226   return;
     1227 }
     1228 
     1229 // put objects in ppf file
     1230 for(int i=0;i<liste.size()-1;i++) {
     1231   bool keeppath = (liste[i][0] == '/') ? true : false;
     1232   SaveObj_P(liste[i], (*pout), keeppath);
     1233 }
     1234
     1235 // close ppf file
     1236 delete pout;
     1237
     1238 return;
     1239}
     1240
     1241/* --Methode-- */
    12071242void NamedObjMgr::SaveAll(string const& flnm)
    12081243{
Note: See TracChangeset for help on using the changeset viewer.