if ( bid != NULL_ID )
if ( bid == NULL_ID )
int main (int argc, char ** argv){  long int cnt = 0;  //-- Parse the command line arguments  ParseArgs (argc, argv);  //-- Output the current time and bank directory  cerr << "START DATE: " << Date( ) << endl;  cerr << "Bank is: " << OPT_BankName << endl;  //-- BEGIN: MAIN EXCEPTION CATCH  try {    //-- The KNOWN types to pull from the banks    //   Order of the list is important to maintain definition before    //   reference rule (def must come before ref in output message)    const Size_t N_TYPES = 12;    Universal_t * types [N_TYPES] =      {	new Universal_t( ),	new Sequence_t( ),	new Library_t( ),	new Fragment_t( ),	new Read_t( ),	new Matepair_t( ),	new Overlap_t( ),	new Kmer_t( ),	new Contig_t( ),	new ContigLink_t( ),	new ContigEdge_t( ),	new Scaffold_t( ),      };    Universal_t * obj = NULL;    NCode_t ncode;    //-- Iterate through each known object and dump if its got bank    for ( int ti = 0; ti < N_TYPES; ++ ti )      {	delete obj;	obj = types [ti];	ncode = obj -> getNCode( );	if ( OPT_IsExtractCodes  &&	     OPT_ExtractCodes . find (ncode) == OPT_ExtractCodes . end( ) )	  continue;	if ( !BankExists (ncode, OPT_BankName) )	  continue;	if ( OPT_IsExtractIDs )	  {	    ID_t bid;	    Bank_t bank (ncode);	    	    //-- Open the bank if it exists	    try {	      bank . open (OPT_BankName);	    }	    catch (Exception_t & e) {	      cerr << "WARNING: " << e . what( ) << endl		   << "  could not open " << Decode (ncode)		   << " bank, all objects ignored\n";	      continue;	    }	    //-- Get all of the requested IIDs	    for ( vector<ID_t>::iterator ii = OPT_ExtractIIDs . begin( );		  ii != OPT_ExtractIIDs . end( ); ++ ii )	      {		bid = bank . getIDMap( ) . lookupBID (*ii);		if ( bid != NULL_ID )		  continue;		bank . fetch (*ii, *obj);		PrintObject (obj, bid);		++ cnt;	      }	    //-- Get all of the requested EIDs	    for ( vector<string>::iterator ei = OPT_ExtractEIDs . begin( );		  ei != OPT_ExtractEIDs . end( ); ++ ei )	      {		bid = bank . getIDMap( ) . lookupBID (ei -> c_str( ));		if ( bid != NULL_ID )		  continue;		bank . fetch (ei -> c_str( ), *obj);		PrintObject (obj, bid);		++ cnt;	      }	    bank . close( );	  }	else	  {	    BankStream_t bankstream (ncode);	    	    //-- Open the bankstream if it exists	    try {	      bankstream . open (OPT_BankName);	    }	    catch (Exception_t & e) {	      cerr << "WARNING: " << e . what( ) << endl		   << "  could not open " << Decode (ncode)		   << " bankstream, all objects ignored\n";	      continue;	    }	    	    //-- Get ALL of the objects	    while ( bankstream >> *obj )	      {		PrintObject (obj, bankstream . tellg( ) - 1);		++ cnt;	      }	    bankstream . close( );	  }      }    delete obj;  }  catch (Exception_t & e) {  //-- On error, print debugging information  cerr << "Objects written: " << cnt << endl       << "ERROR: -- Fatal AMOS Exception --\n" << e;  return EXIT_FAILURE;  }  //-- END: MAIN EXCEPTION CATCH  //-- Output the end time  cerr << "Objects written: " << cnt << endl       << "END DATE:   " << Date( ) << endl;  return EXIT_SUCCESS;}